Question: Using C# and Virtual Studio 2015 Create a class called Insurance that instantiates an employee from the Employee class an Employee class (that you also

Using C# and Virtual Studio 2015

Create a class called Insurance that instantiates an employee from the Employee class an Employee class (that you also create) and 2 instance variables.

The Employee class should contain the name, address, and ID number.

The Insurance class will have instance variables the agent, are the number of customers, and state where local insurance headquarters are located. Use the correct datatype, and in the comments of your program state why you choose the data type you did.

Example:

// I choose int for customers since you cannot have half ( .5 ) of a customer

int iCustomers = 8;

Create a constructor that initializes the class members. The Insurance class must contain a C# property for each instance variable for get and set. These are not java access and mutators. The property for number should verify that the number of Insurance customers is greater than zero. If a negative value is passed in, the set accessor should set the Insurance number to 0.

Create a another class InsuranceTest (this will be the driver class in Java parlance) that prompts the user for information to create two Insurance objects using the constructor that you developed for the Insurance class. Display agent information, number of customers, local state.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!