Question: PARTICIPATION 8 . 3 . 3 : Rearrange the code to construct a cash register. Full screen ACTIVITY Rearrange the following lines of code to

PARTICIPATION
8.3.3: Rearrange the code to construct a cash register.
Full screen
ACTIVITY
Rearrange the following lines of code to construct a cash register, process a sale of three items under $10, print the count and then the total. Then process another sale of two items over $10 in the same way.
How to use this tool
Unused
reg1. additem(2.95) ;
reg1. addItem(19.95) ;
reg1. addItem(12.95);
System.out.println(reg1.getTotal());
System. out. print reg1. getCount ()) ;
reg1. addItem(5.95);
reg1. addItem(1.95);
System.out.println(reg1.getTotal());
reg1. clear();
CashRegister reg1= new CashRegister();
System. out. print ln(reg1. getCount ());
RegisterDemo.java vv Load default template.. publio class RegisterDemo
{ public static void main (String [] args){
 PARTICIPATION 8.3.3: Rearrange the code to construct a cash register. Full

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 Databases Questions!