Give a flowchart and a pseudocode for the program.

Assignment Help Programming Languages
Reference no: EM13951125

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.

After designing 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.

Give a flowchart and a pseudocode for the program.

Reference no: EM13951125

Questions Cloud

Advantages of using voip compared to traditional phones : What are the advantages of using VoIP compared to traditional phones? What are the disadvantages? What switch feature is often used when implementing VoIP?
Reports of walmart bribing mexican officials : In recent years reports of Walmart bribing Mexican officials points to an often encountered problem; working against American regulation. Research the Walmart issue using material from the Economist, the Wall Street Journal or other sources (be su..
Best example of a strong password : Which of the following can be used to determine how much traffic a website is getting?
Determine the effectiveness of a training program : A researcher believes that younger people use more drugs than older ones. He samples 50 teens and 50 people in their thirties measuring the number of times subjects had used marijuana or cocaine in the past three months.
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".

Reviews

Write a Review

Programming Languages Questions & Answers

  List three challenges in planning and designing

List three challenges in planning and designing a solution for a programming problem. What could you do to overcome these challenges?

  Write a code to locate and rank keywords

You are working on the custom Web application to design document library for client. Write code to locate and rank the keywords. You have been given sample document to use for testing.

  Calculate the average of a variable quantity of integers

Create a simple command line program to calculate the average of a variable quantity of integers that are passed as an argument when the program is called.

  How do we convert string values from keyboard to numeric

Let's discuss how to use the Java I/O classes such as the system and the scanner classes to do console IO and the JOptionPane class to do dialog based IO. How do we convert string values from keyboard to numeric values

  Design tower of hanoi puzzle program

Implement and design Tower of Hanoi Puzzle program using C# and Windows Presentation Foundation WPF template in Visual Studio 2012 or newer.

  Design logic for application to allow user to enter item

Design the logic for an application that allows a user to enter an ordered item continuously until a sentinel value is entered. After each item, display its price or the message.

  Write a program to compute the probability

Write a program (or a peudocode) to compute the probability that at least 2 people have the same birthday, given there are 2, 3, 4,....,60 people in the room.

  Which intelligent network agent used to make a custom search

Businesses that succeed in their markets but that earn lower profits than their competitors would appear at what point on Porter's Curve?

  This laboratory gives practice in the creation and use of

this laboratory provides practice in the creation and use of basic and advanced sql queries involving more than one

  Discuss the triangle program

NextDate is a function of three variables: month, date, and year. It returns the date of the day after the input date. The month, date, and year variables have integer values subject to these conditions

  Program prompt teacher to input student number

The program must prompt teacher to input student number. Quiz score for that student will be displayed. Program can prompt for each quiz score.

  Prolog program to reads employee-s number

Write a prolog program that reads an employee's number from the keyboard, number of hours worked and an hourly rate of pay.

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