subject
Engineering, 06.10.2019 08:00 raemyiajackson1

My mother always took a little red counter to the grocery store . the counter wasused to keep tally of the amount of money she would have spent so far on that visitto the store if she bought everything in the basket. the counter had a four-digitdisplay, increment buttons for each digit, and a reset button. an overflow indicatorcame up red if more money was entered than the $99.99 it would register. (thiswas a long time ago.)write and implement the member functions of a class counter that simulates andslightly generalizes the behavior of this grocery store counter. the default constructor should create a counter object that can count up to and have a value of 0. the object should have a public member function void setlimit(int ) that resets the counting limit from 1 to . when it is called it should call the reset function. if setcounter's argument is less then or equal to 0 or greater then the mutator should throw an exception. the member function void reset( ) ; sets the counter’s number to 0 . the member function void incr1( ) ; increments the units digits by 1 , void incr10( ); increments the tens digit by 1 , and void incr100( ); and void incr1000( ); increment the next two digits, respectively. accounting for any carrying when you increment should require no further action than adding an appropriate number to the private data member. a member function bool overflow( ); detects overflow. overflow is the result of incrementing the counter’s private data member beyond the maximum created by the default constructor or setcounter. overflow should be called after any series of calls to any of the incrementor functions. if overflow occurs the counter limit should be reported, and the fact that the counter has been reset to 0 by calling the reset function. use this class to provide a simulation of my mother’s little red clicker. the clicker is represented by an integer on the screen. the rightmost (lower order) two digits are alwaysthought of as cents and tens of cents, the next digit is dollars, and the fourth digit is tensof dollars but no special formatting is to be done to represent this on the screen. the class should have a member functions: int getcounterand int getlimit that when called returns the current value of the clicker and the current limit. these functions should be called by the main program after the clicker's limit is set, when it is incremented , reset, or overflow happens. provide keys for cents, dimes, dollars, tens of dollars, and reset. use the keys asdfrq: a for cents; i for dimes; d for dollars; f for tens of dollars; r for the reset function; s to set counter and q to quit. once a letter is selected and return is pressed the user is asked to enter a digit between 1 and 9 . the appropriate member function, based on whether asdf was pressed, should be called 1 to 9 times toincrement the counter.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 19:30
When using the ohmmeter function of a digital multimeter, the leads are placed in what position relative to the component being tested? a. parallel b. control c. series d. line
Answers: 3
question
Engineering, 04.07.2019 18:10
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
question
Engineering, 04.07.2019 18:10
Aturning operation is performed with following conditions: rake angle of 12°, a feed of 0.35 mm/rev, and a depth of cut of 1.1 mm. the work piece is aluminum alloy 6061 with t6 heat treatment (a16061-t6). the resultant chip thickness was measured to be 1.0 mm. estimate the cutting force, fc. use shear stress of 207 mpa and coefficient of friction on the tool face of 0.6.
Answers: 1
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
You know the right answer?
My mother always took a little red counter to the grocery store . the counter wasused to keep tally...
Questions
Questions on the website: 13722362