Question: Lab Printer CSIS-1410 Create a class called PrinterApp as well as the following three classes as specified in the class diagrams Notice that the class

 Lab Printer CSIS-1410 Create a class called PrinterApp as well asthe following three classes as specified in the class diagrams Notice that

Lab Printer CSIS-1410 Create a class called PrinterApp as well as the following three classes as specified in the class diagrams Notice that the class name Printer and its method print are spelled in italic This indicates that Printer is an abstract class and print is an abstract method Printer serialNumber int +constructor Printer (number: int) +print () toString () String LaserPrinter InkjetPrinter - remainingToner: int + constructor LasserPrinter (sNumber: int) +getRemainingToner () int +print() - remainingCartridge: int +constructor InkjetPrinter(sNumber: int) +getRemainingCartridge (): int +print () Ad Printer Printer is an abstract class and print is an abstract method. The method toString returns a string of the following form className #idNumber (e.g. InkjetPrinter #1234567 or LaserPrinter #2345678) Ad LaserPrinter /InkjetPrinter: In the constructor do the following Set the value of remainingToner/ remainingCartridge to 100 (100% full when new) and initialize the base class In method print do the following a) If the remaining Toner/ remainingCartridge is greater 0 reduces the value by 10 It also prints a message that informs the user that the printer is printing and how much toner / cartridge is left e.g. : Laserprinter is printing. Remaining toner: 90% e.g": InkietPrinter is printing. Remaining cart rdge: 80% If the field is O print a message that the toner /cartridge is empty. Do NOT subtract anything from 0. b)

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!