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
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