Question: Write a C# Class that will hold animal data in a file called animal.cs. The class should have appropriate data type fields for animal type,

Write a C# Class that will hold animal data in a file called animal.cs.

The class should have appropriate data type fields for animal type, breed, color, gender, and cost.

There should be properties for all fields.

Create a default constructor that will set the fields to Cat, Siamese, Seal Point, Male, 5000.00. Values match the order of fields above.

Also build a constructor that will accept the all field values to instantiate when needed.

Add a field to store sales tax. Do not add this field to the constructors built in the instructions above. You will need to build a method to calculate sales tax of 7.5 percent based on the cost and store that amount in the field.

Your gender public property should look for the values F or M and change the value to Female or Male.

You do NOT have to create a program that uses this class; only create the class in your Visual Studio project.

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!