So I needed a couple of classes as fillers and the school placed me in C++. I came in at a rather odd time because they are starting their forth major project. And I am a bit lost on where to start.
So all im asking is for a few hints or something that'll help me get started with a better understanding of what i need to do. Ill post what the project is if that'll help. Understand the situation im in.
To be honest I do not have any strong knowledge on this language, but would be willing to study from helpful sources.
Designing the program. This will include deciding what functions to
include in your program. Your design must include a function for
gathering the data, a function for printing the bill, and functions for
processing the data.
Test data supplied in the data file called Cater.txt.
"Its a text file with this in it"
{
The Caswell Catering and Convention Service has asked you to write a computer program to produce customers’ bills. The program should read in the following data:
a. The number of children to be served.
b. The number of adults to be served.
c. The cost per adult meal.
d. The cost for dessert (same for adults and children)
e. The room fee (fee is 0 if catered at the person’s home).
f. A percentage to be charged for tip and tax (not applied to the room fee).
g. Any deposit that should be deducted from the bill.
*Cater.txt contains data in the order listed above.
*Note: The cost of a child’s meal is 60% of the cost of an adult’s meal.
The sample output below uses the first line of data from Cater.txt:
Caswell Catering and Convention Service
Final Bill
Number of Adults: 23
Number of Children: 7
Cost per adult without dessert: $ 12.75
Cost per child without dessert: $ 7.65
Cost per dessert: $ 1.00
Room fee: $ 45.00
Tip and tax rate: 0.18
Total cost for adult meals: $ 293.25
Total cost for child meals: $ 53.55
Total cost for dessert: $ 30.00
Total food cost: $ 376.80
Plus tip and tax: $ 67.82
Plus room fee: $ 45.00
Less deposit: $ 50.00
I always start problems by writing out pseudocode to help me with the logic. You sort of have that going for you already, meaning that you know what your figures should be.
1. You already have your input so start writing code thinking about prompts for the user and then variables to hold the information the user puts in.
2. Next you can see the process of multiplying your costs times the amount of people. I would look at your book in the math chapter to help you with the syntax.
3. Finally, you can see the totals that you need to display so think about how to write code that allows you to display text and then add your variables into that logic.
I hope this helps. If you are completely new to this, I would start with trying to write out "Hello World" to your console.