Question: java program September 9, 2018 OBJECT-ORIENTED PROGRAMMING - CS102 SAMPLE OF OUTPUT: Enter item detail: Department: 80 Quantity: 2 Price : 180 Description Womens Quantity
September 9, 2018 OBJECT-ORIENTED PROGRAMMING - CS102 SAMPLE OF OUTPUT: Enter item detail: Department: 80 Quantity: 2 Price : 180 Description Womens Quantity Price Total After Discount $20.ee $160.ee 100 Another item? (Yes - 1, No. 2):> 1 Enter item detail: Department: 11 Quantity: 1 Price : 100 Description Mens Quantity Price 100 Total After Discount $1ee.ee $65.ee Another item? (Yes - 1, No - ):> Total purchase: $225.00 Exit. PROBLEM SOLVING TIPS: Num Tips Class Cash Reg with four attributes department, description, discount and Grade /2m a) total 2m d) b) Write a constructor than can perform initialization to all data members according to the data type and specification mentioned in Table 1 c) public set and get method for all attributes. public method calTotal in which will assign value to total based on this formula total = total + quantity "price-price' discount) where price and quantity are from user Main program which can create object instance and derive user input during execution with control of sentinel loop, determine the discount 10m based on code entered passed the value to method cafTotall to calculate total purchase as shown in output. . Finally, submit your work on Blackboard at the link provided Practical S.H. Haris Set 171 Page 2 of 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
