Question: Plan the logic for a program that continuously prompts a user for a customer number until an appropriate sentinel value is entered. Also prompt each

Plan the logic for a program that continuously prompts a user for a customer number until an appropriate sentinel value is entered. Also prompt each user for the stock number of an item being ordered and the quantity ordered. If the customer number is not between 1000 and 7999 inclusive, and is not the sentinel, continue to prompt until a valid customer number is entered. If the stock number of the item is not between 201 and 850 inclusive, continue to prompt for the stock number. Pass the stock number to a method that a colleague at your organization has written; the methods signature is num get Price(num stock Number). The get Price() method accepts a stock number and returns the price of the item. Multiply the price by the quantity ordered, giving the total due. Pass the customer number and the calculated price to a prewritten method whose signature is void displayBill(num custNum, num price). This method determines the customers name and address by using the customer ID number, and calculates the final bill, including tax, using the price. Organize your program using as many methods as you think are appropriate. You do not need to write the getPrice() and displayBill() methodsassume they have already been written.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!