In python create a printer class: - use methods found in template below Expected output should allow the user to type nu

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In python create a printer class: - use methods found in template below Expected output should allow the user to type nu

Post by answerhappygod »

In python create a printer class:
- use methods found in template below
In Python Create A Printer Class Use Methods Found In Template Below Expected Output Should Allow The User To Type Nu 1
In Python Create A Printer Class Use Methods Found In Template Below Expected Output Should Allow The User To Type Nu 1 (76.26 KiB) Viewed 66 times
Expected output should allow the user to
type number of printers to create by typing create then a
number
for example: create 5
Add print jobs with various numbers of pages by typing add and
listing the number of pages per job
for example: add 5 7 4 9 10 34 5 20
and choose the number of pages they want to print per
cycle
for example: cycle 6
final implementation should look like this:
printer_simulation()
In Python Create A Printer Class Use Methods Found In Template Below Expected Output Should Allow The User To Type Nu 2
In Python Create A Printer Class Use Methods Found In Template Below Expected Output Should Allow The User To Type Nu 2 (98.24 KiB) Viewed 66 times
class printer: def __init__(self, name): self.name = name def __str__(self): pass def is_ready(self): # returns boolean after inspectin # of pages to print pass def print(self): # subtracts 1 from the number of pages left to print # adds 1 to the total number of pages so far pass def accept(self, pages): # updates the number of pages to print 'pages' pass def print_simulation(): # create a queue object that will hold all print jobs # create a list that will hold all printers pass
create 5 add 5 7 4 9 10 34 5 8 4 20 status Printer: Pages to print: 5 Total pages printed: 0 Printer: 1 pages to print: 7 Total pages printed: 0 Printer: 2 Pages to print: 4 Total pages printed: 0 Printer: 3 Pages to print: 9 Total pages printed: 0 Printer: 4 Pages to print: 10 Total pages printed: 0 Jobs in queue: 5 [34, 5, 8, 4, 20] cycle 6 status Printer: @ Pages to print: 4 Total pages printed: 6 Printer: 1 Pages to print: 1 Total pages printed: 6 Printer: 2 Pages to print: 32 Total pages printed: 6 Printer: 3 Pages to print: 3 Total pages printed: 6 Printer: 4 Pages to print: 4 Total pages printed: 6 Jobs in queue: 3 [8, 4, 20] [
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply