Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
Question
Book Icon
Chapter 10, Problem 5E

(a)

Program Plan Intro

Program Plan: 

  • IDNumber, Make, Year, Price, autoId, autoMake, autoYear, autoPriceand temp2 variables are used in the program.
  • ToString (),TryParse (), Any (), Add (), Sum (), Sort (),CompareTo (),andJoin () methods are used in the program.

Program Description: The main purpose of the program is to prompt the user to enter the data for the eight Automobile class objects. Create an Automobile class with the auto-implemented properties for the instance variable named IDNumber, make, year, and price. Return all the data of the Automobile class using the ToString () method. Sort the objects of the Automobile class in the IDNumber order.

(b)

Program Plan Intro

Program Plan: 

  • IDNumber, Make, Year, Price, autoId, auto Make, auto Year, auto Price, Financed Amount, Interest Rate, autoFinAm,and auto IR variables are used in the program.
  • ToString (),TryParse (), Any (), Add (), Sum (), Sort (),CompareTo (),andJoin() methods are used in the program.

Program Description: The main purpose of the program is to drive a new class named Financed Automobile from the base class named AutoMobile. Incude two extra instance variable in the Financed Automobile class to store the financed amount and interest rate of an Automobile. Create the auto-implemented properties for the financed amount and interest rate variable. Override the ToString () method of the AutoMobile class in the Financed Automobile class to display the value of financed amount and interest rate of an Automobile. Prompt the user to enter the details off our Financed Automobile class objects. The financed amount must be less than the price of an Automobile. Return all the data of the Automobile class using the ToString () method. Sort the objects of the Automobile class in the ID Number order.Display the total of the price of all the Automobiles.Display the total of the financed amount of all the Automobiles.

(c)

Program Plan Intro

Program Plan: 

  • IDNumber, Make, Year, Price, autoId, autoMake, autoYear, autoPrice, FinancedAmount, InterestRate, autoFinAm,andautoIRvariables are used in the program.
  • ToString (),TryParse (), Any (), Add (), Sum (), Sort (),CompareTo (),Join (), andstring.Format()methods are used in the program.

Program Description:The main purpose of the program is to use an extension method for the class named FinancedAutomobile. This method is used to compute and return the monthly due payment of a FinancedAutomobile. Prompt the user to enter the details of four FinancedAutomobile class objects. Display all the data of all four objects.

Blurred answer
Students have asked these similar questions
Design an application that declares an array of 20 AutomobileLoan objects. Prompt the user for data for each object, and then display all the values.
This is the question I am stuck on - Radio station KJAVA wants a class to keep track of recordings it plays. Create a class named Recording that contains fields to hold methods for setting and getting a Recording’s title, artist, and playing time in seconds. Write an application that instantiates five Recording objects and prompts the user for values for the data fields. Then prompt the user to enter which field the Recordings should be sorted by—(S)ong title, (A)rtist, or playing (T)ime. Perform the requested sort procedure, and display the Recording objects. This is what I have so far - public class Recording {     private String song;     private String artist;     private int playTime;     public void setSong(String title) {         this.song = title;     }     public void setArtist(String name) {         this.artist = name;     }     public void setPlayTime(int time) {         this.playTime = time;     }     public String getSong() {         return song;     }     public String…
Create the StockTask1 Java project Create a Stock object class that contains the following information: The symbol of the stock is stored in a private string data field called symbol. The stock's name is stored in a private string data field called name. previousClosingPrice is a private double data area that stores the stock price for the previous day. currentPrice is a private double data area that stores the stock price at the current time. A constructor for creating a stock with the given symbol and name. For the data fields, there are accessor methods (get-methods). For the data fields, there is a mutator method (set-methods). A method named getChangePercent()that returns the percentage changed from previousClosingPrice to currentPrice. Formula:perc_change = (current price - previous closing price) / previous closing price x 100 Create a test class named testStockthat creates a Stockobject with the stock symbol SUNW, the name Sun Microsystems Inc., and the previous closing…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage