Create a pilot program for the veterinarian as a proof


Assignment:

Program Specifications

A veterinarian friend of yours has expressed interest in having program made to help them manage their clinic. Being that you have some programming skill, you have offered to create a pilot program for the veterinarian as a proof of concept with the hopes that you will be contracted to create the clinic's entire system. Currently, the clinic sees a lot of dogs and cats that require one of two specific medications: Acepromazine and Carprofen. As a pilot project, you will create a program that will help track the administration of these two drugs to the pets that are brought in.

The program build will be developed in two parts:

Part A - Class and Object Implementation

Pet Class

Design a class named Pet that meets the following requirements:

• A string property named Name for the pet (default value is "Spot").

o The mutator for Name will check if the new value contains at least one nonwhitespace character otherwise it will throw an exception.

• An int property named Age in years for the pet (default value is 1).

o The mutator for Age will check if the new value is one (1) or greater before using the new value otherwise it will throw an exception.

• A double property named Weight in pounds for the pet (default value is 5).

o The mutator for Weight will check if the new value is five (5) or greater before using the new value otherwise it will throw an exception.

• A string property named Type that indicates if the type of pet is a dog or a cat (default is D for Dog).

o The mutator for Type will check if the new value is D or C before using the new value otherwise it will throw an exception.

o The accessor for Type will return the string literal Dog if the type is D otherwise it will return the string literal Cat.

• A no-argument constructor that creates a default pet.

• A constructor that creates a pet with a specified name, age, weight, and type.

• A method named Acepromazine() that returns as a double the dosage in ml for the sedative acepromazine.

• A method named Carprofen() that returns as a double the dosage in ml for the pain killer carprofen.

The dosage calculation is:

Dosage (ml)= Weight * mg per kg/mpg per ml

Note: Weight is in kg

• For acepromazine, use mg per ml = 10, and mg per kg = 0.03 for dogs and 0.002 for cats.

• For carprofen, use mg per ml = 12, and mg per kg = 0.5 for dogs and 0.25 for cats

Part B - Pet List Implementation

Improve on the program developed in Part A by adding the following features:

• The program should make use of a ‘database' (i.e.. CSV file) to store pets

o The ordering of fields for the CSV file is up to you, ensure that it is an acceptable format

• Read the file into the system when the program begins

o Load each pet from the file as a Pet object and store the Pet objects in a List

• Allow the user to search for an existing pet in the system in addition to being able to add a new Pet

o Add the ability to remove pets from the system

• The ‘database' file must keep accurate records for the system

o Any new pet additions to the system must be added to the List of Pets

o Any pets removed from the system must be removed from the List of Pets

o Write the List of Pets to the file when the program ends

Coding Requirements (these requirements are expected, and you will not receive corrective feedback prior to the submission deadline if any of the following are unmet)

• A C# comment block at the beginning of the source file describing the purpose, input, algorithm, output, author, last modified date of the program

• All methods must be properly documented and commented

• Write only one statement per line.

• Use camelCase for local variable names.

• Use PascalCase for any constant variable names

• Use defensive programming where necessary

• Ensure graceful handling of exceptions (i.e. your program must not crash)

Aside from what's been presented in this document, do not make any assumptions. Seek clarity from your instructor if you do not understand something in this document.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Create a pilot program for the veterinarian as a proof
Reference No:- TGS03154883

Now Priced at $70 (50% Discount)

Recommended (91%)

Rated (4.3/5)