1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
velikii [3]
3 years ago
6

Suppose the CashRegister needs to support a method void undo() that undoes the addition of the preceding item. This enables a ca

shier to quickly undo a mistake. What instance variables should you add to the CashRegister class to support this modification
Computers and Technology
1 answer:
a_sh-v [17]3 years ago
3 0

Answer:

previousAddition instance variable

Explanation:

In order to accomplish this you would need to add a previousAddition instance variable. In this variable you would need to save the amount that was added at the end of the process. Therefore, if a mistake were to occur you can simply call the previousAddition variable which would have that amount and subtract it from the total. This would quickly reverse the mistake, and can be easily called from the undo() method.

You might be interested in
Desktop operating systems sometimes are called ______ operating systems because they also work in conjunction with a server oper
valina [46]
<span>Client, because they are a part of the server operating system request line. The client asks for a request for information or data from the provider (the server) and the server provides this to its client (the desktop computer). They work together hand in hand one is recieving information and one is sending information</span>
4 0
4 years ago
How do you record your own video game Music and post Them on yt
Alex777 [14]

Answer:I would try downloading a beat app and making a song,then posting

Explanation:

8 0
3 years ago
Read 2 more answers
Play-e-ball, a company that creates games for gaming consoles, gathers data from the information systems of its partners, suppli
ad-work [718]

Answer:

Option B

Explanation:

It is the perfect example of BI(Business Intelligence).

7 0
3 years ago
(PYTHON HOMEWORK)Given the following code snippet, which statement tests to see if all three sets are equal?:
wariber [46]

Answer:

Option D is the correct answer to the following question.

Explanation:

The following option is correct because three sets type variable i.e., "fruit", "fruit2", "fruit3" has contain the same values in it and then they ask for the option is correct if the all are equal and in the option c, there is the if statement in which check the condition if the variable "fruit" is equal to the variable "fruit2" and the variable "fruit" is equal to the variable "fruit3".

so, that' why the following option is correct.

The option A is not correct because there is no equal function in python and we use the operator == to check the condition.

The option B is incorrect because we can see that there is not equal to (!=) operator.

The option D is incorrect because we can see that there is an or operator are used which means if any of the conditions is true then, they return either the other condition is false.

8 0
4 years ago
A student should always read the directions to a test or question so they know what is expected of them when answering the quest
Kay [80]

I don't know why you needed to ask this but the answer is True

7 0
3 years ago
Read 2 more answers
Other questions:
  • Scratch and grinding marks on sedimentary rocks indicate which type of environment?
    6·1 answer
  • Who defined the term crowdsourcing in a Wired magazine article?
    15·1 answer
  • Which of the following is a malicious program that can replicate and spread from computer to computer?
    8·2 answers
  • Which of these is an effective color scheme?
    14·1 answer
  • If totalMonths has a string value of "13", what does the code that follows display?var years = parseInt ( totalMonths / 12 );var
    6·1 answer
  • A professional bureaucracy is a knowledge-based organization where goods and services depend on the expertise and knowledge of p
    7·1 answer
  • Which of the following is a correct statement about writing down passwords on a ""cheat sheet?""
    7·1 answer
  • Hat is the purpose of the domain name?
    7·2 answers
  • Can someone help me with python
    10·1 answer
  • What are some limitations when it comes to testing and ensuring program quality? List at
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!