
Penny C.
asked 02/09/14Starting out with C++ review question
A retail store grants its customers a maximum amount of credit. Each customer's available credit is his or her maximum amount of credit minus the amount of credit used. Write a pseudocode algorithm for a program that asks for a customer's maximum amount of credit and amount of credit used. The program should then display the customer's available credit. After you write the pseudocode algorithm, convert it to a complete C ++ program.
More
2 Answers By Expert Tutors
Charles C. answered 02/01/16
Tutor
New to Wyzant
Effective English, math, coding Tutor who taught thousands of students
I agree with Kenneth and Bivas. I wanted to add that when you write your pseudo-code, you don't have to worry about syntax, but pay attention to your indentation and choice of data-types. This will help you when writing the actual program.
Also, even though this is not the same as the one for your problem, you will need an "if..else" conditional statement similar to the one below in your program when checking for available credit.
if ( CalculatedNumber >= Some_Number) {
....
}
else {
else {
....
}

Bivas B. answered 04/21/14
Tutor
5.0
(256)
100% helpful and committed tutor working for your success.
Hi Penny, I agree with Kenneth. Having said that, if you're looking for some pointers(not C++ pointers:) to start off your programming, here are some hints
1. Initialize the max credit and available credit to the same number for each customer (this would go in your customer class)
2. Compute the credit requested (this could come from user input or as a result of a "purchase" function depending on your program requirement)
3. If credit requested is greater than available credit, handle credit limit reached condition. (Increase credit limit or deny credit request - if you're increasing credit limit, then re-assign max credit and add that amount to your available credit and go to step 4)
4. If credit requested is less than available credit, subtract credit from available credit and make that amount the new available credit.
5. Display available credit.
6. Repeat steps 2 - 5 depending on program requirement.
Hope this helps.
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Kenneth G.
02/10/14