Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions