Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

Thank you for any help you can provide.

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions