Question

For this program you will be looking at future tuition at your university. In 2020, the...

For this program you will be looking at future tuition at your university. In 2020, the tuition for a full time student is $6,540 per semester, the tuition for a part time student is $3,320. The tuition will be going up for the next 7 years at a rate of 3.5% per year. Write a program using if-else and a loop. Ask the user if they are a full time or part time student, then display the projected semester tuition for the next 7 years. You should display the actual year (2021, 2022, through 2027) and the tuition amount per semester for that year.

REMEMBER to write your name through comments in the program, and use comments to explain what your program is doing.

(please don't forget the comments)

Homework Answers

Answer #1

#include <iostream>

using namespace std;

int main()
{
char student_type;
int full_tution_fee=6540,part_tution_fee=3320;
cout<<"Enter F for full time student or P for part time student:-";
cin>>student_type;
  
if(student_type=='F' ||student_type=='f' )
{
for(int i=2021;i<=2027;i++)
{
cout<<"Fees for first semester for year "<<i<<" is =$"<<full_tution_fee<<endl;
cout<<"Fees for second semester for year "<<i<<" is =$"<<full_tution_fee<<endl;
full_tution_fee +=0.035*full_tution_fee;
}
  
}
  
else if(student_type=='P' ||student_type=='p' )
{
  
for(int i=2021;i<=2027;i++)
{
cout<<"Fees for first semester for year "<<i<<" is =$"<<part_tution_fee<<endl;
cout<<"Fees for second semester for year "<<i<<" is =$"<<part_tution_fee<<endl;
part_tution_fee +=0.035*part_tution_fee;
}
  
}
  
else
cout<<"invalid input";

return 0;
}

//this code handles the price in two variables- full_tution_fee and part_tution_fee.
//User just need to enter f or p depending on the full time or part time student.
//The user value is cross checked in "if statement" and procedded accordingly.
//After checking the condition the loop is executed 7 times representating each year and the fees
//is updated in every time loop is executed.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
write a algorithm for one college the tuition for a full-time student is $8,000 per semester....
write a algorithm for one college the tuition for a full-time student is $8,000 per semester. it has been announced that the tuition will increased my 3 percent each year for the next 5 years. write a program with a loop that displays the projected semester tuition amount for the next 5 years
Financial Application: Compute Future Tuition: For current Nashua College students the tuition cost for 12 credits...
Financial Application: Compute Future Tuition: For current Nashua College students the tuition cost for 12 credits is $2112 per semester, with an additional Technology cost of $120 per semester. In addition, Health Insurance costs add an additional $1595 per semester.             “Scott” is 10 years old (in 2020), and he would like to attend Nashua Community College and major in IT when he turns 18, 8 years from now. If we assume annual costs will increase 5% per year into...
For this exercise using Python you will calculate college tuition increase. Current tuition per year averages...
For this exercise using Python you will calculate college tuition increase. Current tuition per year averages $25,000. Over the next 5 years tuition will increase 2.5%. Your application should loop through values during this period and provide a print similar to the following. Year 1: $25,000 Year 2: $25,625 Year 3: $26,276.63 Year 4: $26,933.54 Year 5: $27,606.88
VISUAL STUDIO (NO JAVA CODING) Create a C# Console Application project to compute the tuition fee...
VISUAL STUDIO (NO JAVA CODING) Create a C# Console Application project to compute the tuition fee a student should pay. In this part of the assignment, you are required to create a C# Console Application project. Project name should be A2<FirstName><LastName>P1. For example a student with first name John and Last name Smith would name the project A2JohnSmithP1. Step 1: Ask if a student is a Canadian Citizen or an International Student. Also ask for their age. You must use...
Please write it in c# program please and if possible no arrays only loops Loop Introduction...
Please write it in c# program please and if possible no arrays only loops Loop Introduction Assignment Using the conditions below, write one program that calculates a person’s BMI. Your main() function will call functions 1, 2, and 3. Your program will contain three functions: Function #1: Will ask the user for their weight in pounds and their height in inches.   Your function will convert the weight and height into Body Mass Index (BMI). The formula for converting weight into...
Suppose that you are planning to pay for your child’s college tuition. Your child was just...
Suppose that you are planning to pay for your child’s college tuition. Your child was just born, and all-four- years of college tuition for your child will be due exactly on the child’s 18 th birthday (i.e. all payments at end of year 17). You think for the first 8 years you can afford to set aside $4,000 per year (with the first deposit being made at the end of the first year). How much will you have to save...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
For PYTHON program you will be writing a program that will use if-else or if-elif-else statements....
For PYTHON program you will be writing a program that will use if-else or if-elif-else statements. Read-It-All bookstore has a book sales club where customers can earn reward points that can be used for their next purchase. If a customer purchases 0 books, he/she earns 0 points. If a customer purchases 1-3 books, he/she earns 5 points. If a customer purchases 4-6 books, he/she earns 10 points. If a customer purchases 7-8 books, he/she earns 15 points. If a customer...
Your son is about to start kindergarten in a private school. Currently, the tuition is $12,000...
Your son is about to start kindergarten in a private school. Currently, the tuition is $12,000 per year, payable at the start of the school year. You expect annual tuition increases to average 6% per year over the next 13 years. Assuming that you son remains in this private school through high school and that your current interest rate is 6%, then the present value of your sonʹs private school education is closest to:
Your oldest son is about to start kindergarten at a private school. Tuition is $8,000 per...
Your oldest son is about to start kindergarten at a private school. Tuition is $8,000 per year, payable at the beginning of the year. You expect to keep your son in private school through high school, and you expect tuition to increase at a rate of 4% per year over the 13 years of schooling. Calculate the present value of the tuition payments assuming a required rate of return of 7%. (Round to two decimals).