Question: Programming Assignment #3 Creating a Class As seen on TV The National Collector's Mint allows you to own a plece of history with their recreation
Programming Assignment #3 Creating a Class As seen on TV The National Collector's Mint allows you to own a plece of history with their recreation proof of the $50 Gold Buffalo Coln, the purest gold coln ever produced by the US. Government Because of a shortage of gold blanks, the U.S. Gavernment had to stop production on the $50 Gold Buffalo Coin, resulting in skyrocketing prices among the latest edition. However, the National Collector's Mint has now released its nonmonetary tribute proof of the famous coin. Clad in pure 24K gold, the $50 Gold Buffalo Tribute Proof comes with an Individually numbered Certificate of Authenticity. Only $9.951 (Plus shipping and handling) If you listen clasely, you learn that each coin contain 14 milligrams of pure goldt is that a deal or what? Let's create a class to find out. I. Your "GoldDigger Class Create a class with these instance variables: The name of the coin . The current price of gold, per ounce . The selling price of the coin : the shiping and handing charges, er con The amount of gold in the coin, in milligrams Your class will have a constructor to initialize the instance variables, accessor ti.e. "get") methods to return the values of the instance variables, and a mutator (Le. "set") method that updates the price of an ounce of gold. Your class will have 2 additional methods: 1. A method that computes and returns the number of coins one would have to purchase in order to own one full ounce of gold 2. A method that computes and returns the total cost of the number of coins computed by the above method, including S & H and sales tax. The tax is paid on the entire order, after all S & H charges have been added
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
