Question: please help ASAP Code in C++ Language INTRODUCTION: In this assignment you will implement class Printer, which represents a real-life computer printer. Your class Printer

please help ASAP

Code in C++ Languageplease help ASAP Code in C++ Language INTRODUCTION: In this assignment youwill implement class Printer, which represents a real-life computer printer. Your class

INTRODUCTION: In this assignment you will implement class Printer, which represents a real-life computer printer. Your class Printer contains the following attributes (member variables Type: Dot Matrix, Ink Jet, or Laser (enum data type) Status: ON or OFF (Boolean value) Printer Capacity: the maximum number o pages that can be loaded into a printer (integer Paper Load: current number of pages loaded into a printer (integer Class Printer contains the following FUNCTIONS: CONSTRUCTORS: Default constructor. Default attribute values are o Printer Capacity 1,000 o lype Do Matrix o Paper Load 1,000 o Status OFF Class Constructor: takes four arguments, one for each class attribute. To receive full credit, make sure that the arguments for paper capacity and paper load are valid (in other words you muust validate the arguments o Printer Capacity-an integer value between 500 and 10,000 o Paper Load and integer value between 0 and Paper Capacity I/O FUNCTIONS Input printer: takes input from the keyboard (a user to set a printer object and validates attribute values (member variable values) of the class. Accepts no parameters. Returns Nothing. Display printer: displays printer information on the screen ACCESSOR MEMBER FUNCTIONS: Get Type: returns the type of the printer Get Status: returns a Boolean value indicating if printer is ON or OFF Get Capacity: returns printer's page capacity Get Load: returns current printer's page load MODIFIER MEMBER FUNCTIONS: Print: prints specified number of pages (e.g. sheets of paper). Function takes a single integer value (as an argument to represent the number of pages to print. Printing rules o If the printer is OFFreturn -1 o Otherwise, If the number of pages to print is larger than the Paper Load then the function sets Paper Load to 0 and returns the number of pages (int) left to print. Otherwise, the function decrements the Paper Load by the number of pages to print and returns 0 Load: loads specified number of pages into a printer. Function takes a sin gle int value as an argument to represent the number of pages to load. Loading rules o If the printer's available capacity (e.g. the difference between the Printer Capacity and the Paper Load is greater than the requested number of pages to oad, then the function increments the Paper Load by the specified number of pages and returns 0 o Otherwise, the function sets Paper Load to the Printer Capacity and retums the number of pages that were NOT loaded

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!