Hi guys, pls help to solve this problem. I already cannot come out with the solution.
The below program will do the Daily Order processing. The main requirement for this program is that the additional order for each category as defined in Product class must be at least minimum 1 unit for Computer, minimum 10 units for Printer and minimum 20 units for Scanner.
This program will check whether the quantity ordered meets the minimum requirement. If yes, the order is made and the additional quantity that meets the minimum requiremnet is updated in the Product class variable, that is, qtyPrepared and qtySold.
Otherwise, a message "Insufficient Qty.-Please come again" should be displayed.
Pls see the below sample screen that what i mentioned above, the sample outcome should look something like this: Item ordered:- Enter product code:c1 Enter quantity:5 More items[Y/N]?:Y Enter product code:p1 Enter quantity:15 More items[Y/N]?:N
Total amount due : $6500
or Item ordered:- Enter product code:p1 Enter quantity:5
Viswanatha GB makes an excellent point on the general design of your program. You are using an approach that is many years out-of-date. If this is what you are being taught in a class, I am disappointed in the teacher.
I realize that if this is an assignment, you may not have time to rewrite everything, so you may be forced to use the modifications that Viswanatha GB suggested to fix your code. But later, when you have more time, look over his/her first approach. It is a much better way to design a program.