hi i have a project to do for school and im not sure if im on the right track i would like some opinions
here is the description of what i have to do
INSTRUCTIONS
Part A
1. Start a new C# project named SalespersonDemo.cs, as
shown in Exercise 9 on page 365.
2. Save this program in the Chapter.08 folder in your
Student files. Refer to Figure 1 as you create your new
project. Create an abstract class named Salesperson.
Refer to pp. 338–341 of your textbook.
3. Include the following fields in abstract class Salesperson,
which are required by the Salesperson constructor:
Include a get method that returns a string that holds the
salesperson’s full name, which consists of the first and
last names separated by a space.
Part B
1. Create two child classes:
• RealEstateSalesperson class, which contains a
total value sold in dollars field and a total commission
earned field that are initialized to 0 and a commis-
sions rate field required by the class constructor
• GirlScout class, which includes a field to hold the
number of boxes of cookies sold, which is initialized
to 0
Note: Include set methods for every field. Refer to pp.
319–334 of your textbook.
Part C
1. Create an interface named ISell that contains two
methods:
• SalesSpeech(), which you’ll implement in all classes
to display an appropriate one- or two-sentence sales
speech that the objects of the class could use
•MakeSales(), which you’ll implement in the
RealEstateSalesperson class to accept an in-
teger dollar value for a house that’s added to the
value of the RealEstateSalesperson’s total value
sold. This will then compute the total commission
earned. You’ll also implement the MakeSales()
method in the GirlScout class to accept an in-
teger representing number of boxes of cookies sold
and add it to the total field. Refer to pp. 341–348
of your textbook.
There is more to it but i havent gotten to that yet
heres what i have so far
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace salespersondemo { public interface ISell { string SalesSpeech(); int MakeSale(); } abstract class SalesPerson : ISell { private string firstName; private string lastName; private string fullName; public string FirstName { set { Console.Write("Please enter the employe's first name : "); firstName = Console.ReadLine(); } } public string LastName { set { Console.Write("Please enter the employe's last name : "); lastName = Console.ReadLine(); } } public string FullName { set { fullName = firstName + " " + lastName; } } } public class RealEstateSalesPerson : SalesPerson { double valueSold = 0; double commission = 0; double rate; public override string SalesSpeech() { return "Would you like to buy this amazing house for a very good price"; } public override int MakeSale() { Console.Write("Please enter the amount of the sale :"); ValueSold = Console.ReadLine(); Commission = valueSold * rate; } } public class GirlScout : SalesPerson { private double boxesSold = 0; public double BoxesSold { set; } } } }