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: 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 (𝑚𝑚𝑚𝑚) = 𝑊𝑊𝑊𝑊𝑊𝑊𝑊𝑊ℎ𝑡𝑡 ∗ 𝑚𝑚𝑚𝑚 𝑝𝑝𝑝𝑝𝑝𝑝 𝑘𝑘𝑘𝑘 𝑚𝑚𝑚𝑚𝑚𝑚 𝑝𝑝𝑝𝑝𝑝𝑝 𝑚𝑚𝑚𝑚 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.

IS IT YOUR FIRST TIME HERE? WELCOME

USE COUPON "11OFF" AND GET 11% OFF YOUR ORDERS