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
This is the question - Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values for each data field. Also create a get method for each field. Write an application that creates at least five Apartment objects. Then prompt a user to enter a minimum number of bedrooms required, a minimum number of baths required, and a maximum rent the user is willing to pay. Display data for all the Apartment objects that meet the user’s criteria or No apartments met your criteria if no such apartments are available. This is the code it has given and I have done some on-  public class Apartment {     int aptNumber;     int bedrooms;     double baths;     double rent;     public Apartment(int num, int bdrms, double bths, double rent) {     }     public int getAptNumber() {         return aptNumber;     }     public int getBedrooms() {         retrun bedrooms;     }     public double getBaths() {…
This is the question - Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values for each data field. Also create a get method for each field. Write an application that creates at least five Apartment objects. Then prompt a user to enter a minimum number of bedrooms required, a minimum number of baths required, and a maximum rent the user is willing to pay. Display data for all the Apartment objects that meet the user’s criteria or No apartments met your criteria if no such apartments are available. This is the code I already have. It doesn't seem to like under TestApartments my apt. variable. I am unsure what to do to fix this cause it doesn't like any of my code -  public class Apartment {     int aptNumber;     int bedrooms;     double baths;     double rent;     public Apartment(int num, int bdrms, double bths, double rent) {         //write code here         aptNumber = num;…
Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and their sum. The SalesTransaction class contains the following fields: Name - The salesperson's name (as a string) salesAmount - The sales amount ( as a double) commission - The commission (as a double) RATE - A readonly field that stores the commission rate (as a double). Define a getRate() accessor method that returns the RATE Include three constructors for the class. One constructor accepts values for the name, sales amount, and rate, and when the sales value is set, the constructor computes the commission as sales value times commission rate. The second constructor accepts a name and sales amount, but sets the commission rate to 0. The third constructor accepts a name and sets all the other fields to 0. An overloaded + operatoradds the sales values for two SalesTransaction objects and returns a new SalesTransaction object. In order to prepend the $ to…
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning