Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program must be written in C#! You Do It In this section, you create a working example of inheritance. You create this example in four
Program must be written in C#!
You Do It In this section, you create a working example of inheritance. You create this example in four parts 1. You create a general Loan class that holds data pertaining to a bank loan-a loan number, a customer name, and the amount borrowed and use a Loan object. of the Loan class but adds information about the automobile that serves as 2. After you create the general Loan class, you write a program to instantiate 3. You create a more specific CarLoan derived class that inherits the attributes collateral for the loan. 4. You modify the Loan demonstration program to add a CarLoan object and demonstrate its use Creating the Loan Class and a Program That Uses It 1. Open a new project named DemoLoan, and then enter the following first few lines for a Loan class. The class contains three auto-implemented properties for the loan number, the last name of the customer, and the value of the loan. class Loan public int LoanNumber get; set; public string LastName tget; set;h public double LoanAmount get; set;h 2. At the top of the file, enter the following code to add a Demoloan class that contains a Main) method. The class declares a Loan object and shows how to set each field and display the results using static System.Console; class DemoLoan static void MainO Loan aLoan = new Loan(); aLoan. LoanNumber = 2239; aLoan. LastName"Mitchell"; aLoan. LoanAmount 1000.00; WriteLine("Loan #10} for {1} is for aLoan. LoanNumber, aLoan.LastName {2}", continues)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started