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
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...
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 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
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...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do depending upon what the user enters, please refer to the examples below to use to test your program. Run your final program one time for each scenario to make sure that you get the expected output. Be sure to format the output of your program so that it follows what is included in the examples. Remember, in all examples bold items are entered by...
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...
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).
Assignment #4 – Student Ranking : In this assignment you are going to write a program...
Assignment #4 – Student Ranking : In this assignment you are going to write a program that ask user number of students in a class and their names. Number of students are limited to 100 maximum. Then, it will ask for 3 test scores of each student. The program will calculate the average of test scores for each student and display with their names. Then, it will sort the averages in descending order and display the sorted list with students’...
Assume the earth’s continents drift about 1.25 centimeters per year. Write a Python program/script using a...
Assume the earth’s continents drift about 1.25 centimeters per year. Write a Python program/script using a for-loop to display the total number of centimeters that the continents will have moved each year for the next 50 years. a. What tasks need to be repeated (write in words)? b. What is the start point of the loop and why? c. What is the end point of the loop and why? d. What is the start value for the initial drift and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT