NEED HELP ASAP PLEASE. I NEED AN EXAMPLE ON HOW TO DO THIS RIGHT.


The second programming project involves writing a program that computes the sales tax for a collection of automobiles of different types. This program consists of four classes. The first class is the Automobile class, which contains the automobile’s make and model, and purchase price, which is specified in whole dollars. It should have three methods:


1. A constructor that allows the make and purchase price to be initialized.


2. A method named salesTax that returns the base sales tax computed as 5% of the sales price.


3. A toString method that returns a string containing the make and model of the automobile, the sales price, and the sales tax, appropriately labeled

Answer :

Other Questions