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
The application reliability team at your company this added a debug feature to their backend service to send all server events t
Paraphin [41]

Answer:

The correct answer to the following question will be Option A.

Explanation:

The given question is incomplete and the complete question will be:

The event records are at least 50 KB and at most 15 MB and are expected to peak at 3,000 events per second. You want to minimize data loss. Which process should you implement?

Append metadata to file the body.

Compress individual files.

Name files with a random prefix pattern.

Save files to one bucket

(B)

Batch every 10,000 events with a single manifest file for metadata.

Compress event files and manifest files into a single archive file.

Name files using serverName-EventSequence.

Create a new bucket if a bucket is older than 1 day and save the single archive file to the new bucket. Otherwise, save the single archive file to the existing bucket.

(C)

Compress individual files.

Name files with serverName-EventSequence.

Save files to one bucket

Set custom metadata headers for each object after saving.

(D)

Append metadata to file the body.

Compress individual files.

Name files with serverName-Timestamp.

Create a new bucket if the bucket is older than 1 hour and save individual files to the new bucket. Otherwise, save files to the existing bucket.

  • Therefore, in option A, a name file can be used with a prefix pattern randomly. So, it will be the right answer
  • The other three options such as C, B and D are incorrect because they are using name files with "serverName-EventSequence" or "serverName-Timestamp" which causes the distribution in the backend irregularly.

7 0
4 years ago
What best describes the kinds of online items that are usually protected by copyright law?
Sergeu [11.5K]

technically, anything that is copyright protected. but the answer that best describes the kinds of online items that are usually protected by copyright law?  the answer is D. Most media work that is available for money


Hope this helps!

-SchoolIsBlaaa

7 0
3 years ago
Henry Ford would have been most interested to bring which modern innovation to his automotive factories?
kondor19780726 [428]
Henry Ford would have been most interested to bring assembly lines which is an modern innovation to his autmotive factories. Although Henry Ford didn't invent cars he developed assembly lines
3 0
3 years ago
Read 2 more answers
What role does modern technology play in globalization today?
lana [24]

<span>Advances in technology are one of the main reasons that globalization has escalated in the past decade. In information and communication technology, innovations have become smaller in size, more efficient and often more affordable. In transport technology, vehicles have tended to become larger and faster, as well as becoming more environmentally friendly and cheaper to run. Whether for personal use or for business, technology has made the world seem a smaller place and assisted in the rise of globalization. </span>
6 0
3 years ago
While an image is still being editing, it is best to save it as a PDF. Group of answer choices True False
Readme [11.4K]

Answer:

f

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Write a SELECT statement that returns an XML document that contains all of the invoices in the Invoices table that have more tha
    8·1 answer
  • What is the main piece of computer software on which every other piece of software relies?
    15·1 answer
  • Explain chart elements​
    12·1 answer
  • Suppose you want to click up- and down-arrows on a "control" to change the value of the product price in cell C7. What form cont
    10·1 answer
  • Create a new file that builds a shopping list from a user. There should be a input query that asks the user to list an item and
    11·1 answer
  • Html code to hyperlink home.html​
    5·1 answer
  • A system of classifying and organizing online content into categories by the use of user-generated metadata such as keywords is
    8·1 answer
  • To read cheques, banks use​
    11·1 answer
  • Write an algorithm to calculate the average<br> value of array of integer elements
    13·1 answer
  • Networks that are designed to connect similar computers that share data and software with each other are called:_______
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!