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

  We would like to implement the lexical order

We would like to implement the lexical order for lists. For simplicity, we only consider lists of numbers, where , >= have their usual meaning.

  How many guesses the user took before getting the correct

You will add input validation and a count to show how many guesses the user took before getting the correct number.

  Create a script that examines a string for the occurrence

Create a script that examines a string for the occurrence of a particular letter in the string Geographic Information Systems.

  Write a python expression that given the variable inputstr

Write a Python expression (or script) that, given the variable inputStr, set as: inputStr = "The quick brown fox jumps over the lazy dog".

  Write a program that prompts the cashier to enter all sales

A supermarket wants to reward its best customer of each day, showing the customer's name on a screen in the supermarket.

  Compare the users choice and the computers choice

Prompt user to select either Rock or Scissors. Instruct computer to randomly select either Paper or Scissors. Compare user's choice and the computer's choice

  Write a function called acronym

Write a function called acronym. This function is passed a string s, and returns a string consisting of all of the capitalized letters in s.

  Write a function that takes as input the cost of the item

Write a function that takes as input the cost of the item that you are purchasing and a Boolean variable indicating.

  Program that allows the user to enter the type of coin

Create a program that allows the user to enter the type of coin to be evaluated and the number of coins. The program should calculate the total weight of the coins and the height of the coins when stacked. Name the program coins.py. Use the table bel..

  Calculate target heart rate during fitness training

Write a program to calculate target heart rate during fitness training. This program has two functions: main and heart_rate_calculator.

  Write python code using a while loop and prompt the user

Create a Python module called LoopsLab to illustrate the solutions to the following problems. Each problem may or may not build on the problem before it.

  Write a program that simulates a traffic light

Write a program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green.

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