Hello Everyone. I have this take home exam and I am stuck on one of the questions. I'm super desperate, please help. I'm a beginner at C++. This exam is due on Monday (March 18th). I am using Qunicy 2005 since that's what we have been using in class. Below is the program that I need to create. Thanks in advance for your time and consideration:
Write a program that will input the following data:
Last month’s balance (float)
Total deposit for the month (float)
Total amount of checks written for the month (float)
And calculate the following:
New balance – last months balance + total deposits – checks – SERVICE_CHARGE
Requirements for the program to be written:
• The program must prompt the user for the above input from the keyboard. The Service charge must be defined using a symbolic constant and assigned a value of $10.00 (the service charge is a flat $10 per month).
• The program must call a function, passing the input, and calculate the new balance. The new balance must be returned to main().
• Output must occur in a function called Output. This function is to clear the screen and display the following, where xxx.xx refers to the inputted values or calculated values.
Balance last month: xxxx.xx
Total deposits for month: xxxx.xx
Total checks for month: xxxx.xx
Service charge: 10.00
New Balance: $ xxxx.xx
• The program should prompt the user to continue (C) or Quit (Q). Consequently, you must use a loop until the user enters a Q to Quit. If the user enters anything other than a C or Q, signify an error exists in input and give the user a second chance for the input of a C or Q.
• If the New Balance is less than or equal to zero (0), display an error message to the right of the line displaying New Balance: $ xxxx.xx
• Such as: New Balance: $ xxxx.xx – Balance Insufficient
• Output all numeric values to 2 decimal places and be sure to place the $ in the line displaying the New Balance.
• You must turn in a cover sheet, followed by this assignment sheet, a copy of the source code, and a copy of the output.
cout<<"enter last month's balance ";
cout<<"enter deposits for month ";
cout<<"enter value of cheques written for month ";
//cout<<"the new balance is $"<<new_ball;
cout<<"\nto continue enter c (q to quit)";
if(ans=='q' || ans== 'Q' )
...don't forget to setprecision(2) above the loop which is defined in the iomanip header file.
Girls/ladies are too much underrepresented in software engineering :-(
Beside the normal girl factor it is proven that females have a better understanding of logic (scientific!) and maths. So I guess they could be of great value if they wouldn't have this strange thinking of what software engineering is.
(But their smart phones they can handle often better than any male)