Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

CPSC 1012 Assignment: Object-Oriented Programming

CPSC 1012 Assignment: Object-Oriented Programming

CPSC 1012 Assignment: Object-Oriented Programming

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.

CPSC1012 Assignment 4 – Fall 2021 Term

Write a program to test your Pet class as shown in the sample run:

|———————| | CPSC1012 Pet Clinic | |———————| Enter the name of your pet: Bob Enter the age in years of your pet: 10 Enter the weight in pounds of your pet: 60 Enter D for Dog, C for Cat: D Name: Bob, Age: 10 years, Weight: 60 lb, Type: Dog Is the information above your pet, correct? Enter y or n: y Service Options: 1. Pain Killer 2. Sedative 3. Both Pain Killer and Sedative Enter the service (1-3) required for your pet: 3 Your pet requires 1.134ml of carprofen. Your pet requires 0.082ml of acepromazine. Do you have another pet that requires service? Enter y or n: Y |———————| | CPSC1012 Pet Clinic | |———————| Enter the name of your pet: Invalid input value. A pet name is required and must contain at least one character. Enter the name of your pet: Fritz Enter the age in years of your pet: 0 Invalid input value. Age must be at least 1 years old. Enter the age in years of your pet: 3 Enter the weight in pounds of your pet: 1 Invalid input value. Weight must be at least 5 pounds. Enter the weight in pounds of your pet: 10 Enter D for Dog, C for Cat: Z Invalid input value. Pet type must be D or C. Enter D for Dog, C for Cat: C Name: Fritz, Age: 3 years, Weight: 10 lb, Type: Cat Is the information above your pet, correct? Enter y or n: Y Service Options: 1. Pain Killer 2. Sedative 3. Both Pain Killer and Sedative Enter the service (1-3) required for your pet: 1 Your pet requires 0.094ml of carprofen. Do you have another pet that requires service? Enter y or n: n Good-bye and thanks for coming to the Pet Clinic.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Homework Free only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Homework Free are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Homework Free is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Homework Free, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

Homework Free Org

Your one stop solution for all your online studies solutions. Hire some of the world's highly rated writers to handle your writing assignments. And guess what, you don't have to break the bank.

© 2020 Homework Free Org