Question: Please check my work a. Design a program for Hunterville College. The current tuition is $20,000 per year, and tuition is expected to increase by

Please check my work

a. Design a program for Hunterville College. The current tuition is $20,000 per

year, and tuition is expected to increase by 3 percent each year. Display the

tuition each year for the next 10 years.

b. Modify the Hunterville College program so that the user enters the rate of

tuition increase instead of having it fixed at 3 percent.

c. Modify the Hunterville College program so that the user enters the rate of

tuition increase for the first year. The rate then increases by 0.5 percent each

subsequent year.

My Soloutions

Chapter 5 Lesson Exercise #10 a. Hunterville CollegeBruce Ledbetter

Design a program for Hunterville College. The current tuition is $20,000 per

year, and tuition is expected to increase by 3 percent each year. Display the

tuition each year for the next 10 years.

start

Declarations

num currenttuition, increaseamountyear, yearlyincrease, count

call calculatemodule()

stop

calculatemodule()

Declarations

currenttution = 20000

increaseamountyear = 0.03

count = 0

while (count <= 10) then

yearlyincrease = ((currenttuition * increaseamountyear) + 20000) + count

count++

endwhile

output "Yearly Tuition $" yearlyincrease

output "Year " count

Chapter 5 Lesson Exercise #10 b. Hunterville CollegeBruce Ledbetter

Modify the Hunterville College program so that the user enters the rate of

tuition increase instead of having it fixed at 3 percent.

start

Declarations

num currenttuition, increaseamountyear, yearlyincrease, count

input "Percent Yearly Increase " increaseamountyear

call calculatemodule()

stop

calculatemodule()

Declarations

currenttution = 20000

count = 0

while (count <= 10) then

yearlyincrease = ((currenttuition *increaseamountyear) + 20000) + count

count++

endwhile

output "Yearly Tuition $" yearlyincrease

output "Year " count

Chapter 5 Lesson Exercise #10 c.Hunterville CollegeBruce Ledbetter

Modify the Hunterville College program so that the user enters the rate of

tuition increase for the first year. The rate then increases by 0.5 percent each

subsequent year.

start

Declarations

num currenttuition, increaseamountyear, yearlyincrease, increaseamountfirstyear, count

input "Percent First Year Increase " increaseamountfirstyear

call calculatemodule()

stop

calculatemodule()

Declarations

currenttution = 20000

count = 0

increaseamountfirstyear

while (count <= 10) then

yearlyincrease = ((currenttuition *increaseamountfirstyear) + 20000) if count <= 1 and <= 10 then

yearlyincrease = ((currenttution * .5) + 20000) if count <> 10

count++

endwhile

output "Yearly Tuition $" yearlyincrease

output "Year " count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!