93%(61)57 out of 61 people found this document helpful
This preview shows page 4 - 8 out of 37 pages.
3.Create the logic for a program that calculates and displays the amount of money you would have if you invested $5000 at 2 percent interest for one year. Create a separate method to do the calculation and return the result to be displayed.
Programming Logic and Design, 7e4.Create the logic for a program that accepts input values for the projected cost of a vacation and the number of months until vacation. Pass both values to a method that displays the amount you must save per month to achieve your goal.
Programming Logic and Design, 7eSolutions 9-Pseudocode:startDeclarationsnum vacaCostnum monthsUntilnum saveoutput “Enter the projected vacation cost ”input vacaCostoutput “Enter the number of months until your vacation ”input monthsUntilsave = savePerMonth(vacaCost, monthsUntil)6
Programming Logic and Design, 7e5.a. Create the logic for a program that performs arithmetic functions. Design the program to contain two numeric variables, and prompt the user for values for the variables. Pass both variables to methods named sum()and difference()Create the logic for the methods sum()and difference(); they compute the sum of and difference between the values of two arguments, respectively. Each method should perform the appropriate computation and display the results..