Reference no: EM13951121
Written Assignment: Pet Class
Design a class named Pet, which should have the following fields:
• Name - The name field holds the name of a pet.
• Type - The type field holds the type of animal that is the pet. Example values are "Dog", "Cat", and "Bird".
• Age - The age field holds the pet's age.
The Pet class should also have the following methods:
• setName - The setName method stores a value in the name field.
• setType - The setType method stores a value in the type field.
• setAge - The setAge method stores a value in the age field.
• getName - The getName method returns the value of the name field.
• getType - The getType method returns the value of the type field.
• getAge - The getAge method returns the value of the age field.
Once you have designed the class, design a program that creates an object of the class and prompts the user to enter the name, type, and age of his pet. This data should be stored in the object. Use the object's accessor methods to retrieve the pet's name, type, and age and display this data on the screen.
You are to submit, as a Microsoft Word Document, the following for this assignment:
1. Flowchart
2. Pseudocode
Remember to follow the guidelines of good program design. Make sure to use meaningful variable names and thoroughly comment each line of your code. You may only use techniques learned in Chapters 1-7.
Give a flowchart and a pseudocode for the program.
: The type field holds the type of animal that is the pet. Example values are "Dog", "Cat", and "Bird".
|
Different types of prescreening tests
: Complete the following for this assignment: Research different types of prescreening tests, and construct a report for the president of the company.
|
Explain major differences between a motor and a generator
: Explain the major differences between a motor and a generator. Explain in detail how the simple motor works and be sure to include the functions of the reed relay and transistor.
|
Describe a little about the fsa program
: Research the social realists who worked under the FSA program during the Great Depression. Write an essay in your own words that addresses the points below: Describe a little about the FSA program
|
Design a class named pet, which should have following fields
: The type field holds the type of animal that is the pet. Example values are "Dog", "Cat", and "Bird".
|
Function of the forbidden city
: All of the cultures that we have looked at this week built architectural monuments, but few have survived intact. Often these monuments embody the social, spiritual, political and religious ideas of the culture that created it. One of the few to h..
|
Write main ideas of given videos
: Watch two videos and write main ideas
|
Audit procedure to ensure accuracy of property plant
: Identify the weaknesses in the stocktake procedures above and identify how they could be improved. Weakness Improvement - Describe audit procedures to ensure the accuracy of the summary of property plant and equipment
|
Analyze the ways in which you-rationally arrived
: Having described these relationships, as you see them, use this explanation to analyze the ways in which you-rationally, experientially, transcendentally etc.-have arrived at your own worldview/beliefs/faith/religious views, etc
|