Our hero, Quincer, has been moved to the Galactic Customs Service. Now, the Galactic Customs Service is really a bunch of crooks. It is their practice to appropriate (that means take) 50% of all the money from people coming through their customs inspections stations.
Currently, the inspectors ask people to empty all their pockets. The inspector then sums the value of all coins, divides by 2 and keeps that amount. This should be easy, except some of the inspectors have trouble with math. It takes them a long time to sum the values of coins.
The Galactic Customs Commander is having his morning coffee. Apparently, this is what commanders do. He is thinking of ways to get people through the lines faster. He remembers he has a new guy, Quincer. “I know,” he says. “I’ll have that new guy Quincer make an easy to use program to add up the value of the coins.”
Poor Quincer, he has received yet another ill-defined project. He knows these assignments are fraught with ambiguity and last minute changes. Despite his best efforts, he can only get a few fuzzy requirements from the commanding officer:
-
The program should have a GUI interface for the customs officers.
-
The program should allow for the office to click on type of coin, and how many.
-
The program should calculate the total. It should also provide ½ the total.
-
The program should allow for all U.S. coins (go look them up).
-
If Quincer is to be promoted to Assistant Commander (he wants this), the program shouldgraphically represent the coins for the officer to keep, and the coins to be returned to the person.
There are some specific implementation details expected:
- Design and Implement a class called MonetaryCoin that is derived from the Coin Class you developed for Coin Flip.
- Store a value in each monetary coin and returns its value.
- Create a main driver class, PocketChange, to instantiate and compute the sum of several MonetaryCoin objects.
- Show that a coin inherits its ability to be flipped.