Design a program that creates an object of the class

Assignment Help Python Programming
Reference no: EM132360884

Question

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 the following for the assignment:

Submit your JAVA source code that you generated from RAPTOR with comments added to each line or where necessary to explain program flow. Also submit the RAPTOR file (flowchart) of your working program.

Make sure you run it to make sure it is error free and does what it is supposed to.

You can use the generate dropdown to create example JAVA code based on your working logical flow chart to see what the code would look like.

Remember to follow the guidelines of good program design. Make sure to use meaningful variable names and include comments as needed.

Instructions: Enter or paste your written work and/or click "Attachments" to upload your files.

Reference no: EM132360884

Questions Cloud

What factors are important to ongoing team dynamics : What factors are important to ongoing team dynamics? Describe guidelines to evaluate the function and productivity of teams.
Strategies would you try to if you were in todd situation : What strategies would you try to if you were in Todd's situation.
Design the appropriate accessor and mutator methods : he day shift is shift 1 and the night shift is shift 2. Design the appropriate accessor and mutator methods for each class.
How the role will impact patient outcomes : The elevator door opens; you step on and find yourself face to face with a known skeptical colleague, who inquires "what are you doing in your profession"?
Design a program that creates an object of 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.
What pain scale are you using : It is 10 pm and you make assessment rounds and find Bobby crying. You ask him what his pain level is. What pain scale are you using?
Classify each threat on a probability-impact matrix : MIS761 – Enterprise Information Management and Security - Deakin University - design of payment systems is outside the scope of this project
Determine the length of the entered string : Determine the length of the entered string and do one of the following: If it is zero characters in length output the message.
What are the aspects of the speech : Select an object, person or place that represents a significant aspect of your cultural background, personality, values, ambitions, etc. Even something.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd