How to design a class and a program

Assignment Help Computer Engineering
Reference no: EM1334918

Suppose myCar is the name of a class variable that references an object, and go is the name of a method. (The go method does not take any arguments.) Write a pseudocode statement that uses the myCar variable to call the method.

In pseudocode, write the first line fo the definition for a Poodle class. The class should extend the Dog class.

Look at the following pseudocode class definitions:
Class Plant
Public Module message()
Display "I'm a plant."
End Module
Class Tree Extends Plant
Public Module message()
Display "I'm a tree."
End Module
End Class
Given these class definitions, what will the following pseudocode display?
Declare Plant p
Set p = new Tree()
Call p.message()

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. "Dog", "Cat", and "Bird"
age - The age field holds the pet's age

The Pet class should also have he following methods:
setName
setType
setAge
getName
getType
getAge

Design a class and a program that creates an object of the class and prompts the user to enter the name, type, and age of his or her pet. This data should be stored in the object. Use the object's accessor method to retrieve the pet's name, type, and age and display this data on screen.

Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Also, design a program that creates three instances of the class. One instance should hold your information, and the other two should hold your friends' or family members' information.

Reference no: EM1334918

Questions Cloud

Generates a random number in the range of 1 : Write down a pseudocode statement that generates a random number in the range of 1 through 100 and assigns it to a variable named rand.
The origin and subsequent evolution of the workplace values : Analyze and explain the origin(s) and subsequent evolution of your personal and workplace values.
Illustrate what are the four stages of the business cycle : Illustrate what are the four stages of the Business Cycle. Compare and Contrast five internal and external Business Cycle theories.
Incorporateing sentencing goals of retribution : You are a judge and an individual appears before you having been convicted of stealing others' identities for monetary gain.
How to design a class and a program : create a class and a program that creates an object of the class and prompts the user to enter the name, type, and age of his or her pet. This data should be stored in the object. Use the object's accessor method to retrieve the pet's name, type, ..
Illustrate what would you expect to see happen to the cost : Illustrate what would you expect to see happen to the cost of a checking account if banks could not make loans. What would happen to the amount of investment made by businesses.
Collective bargaining : The local union most often is affiliated with a national or international union and Some national unions will negotiate master agreements,
How to identify a task you perform regularly : define the architectural differences between the object-oriented and structured designs. Which of the designs makes more sense to you? Why?
Discuss the consistency of mutual fund performance : Discuss the consistency of mutual fund performance results, as studied by Goetzmann and lbbotsoni ndifferent between the after tax returns on a corporate bond paying.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write down a simple c++ cash register program

The program must ask for the customer's first name and last name initials. Use 2 different variables, one for the first name and one for the last name.

  Application and technology architectures

Generate an application architecture plan for the RPS to follow for the next five (5) years. Build a technology architecture plan and graphic rendering for RPS in order to follow for the next five (5) years.

  How looping statements different from selection

define when you would use a while loop rather than a for loop and vice versa. Provide an example of one such instance.how looping statements different from selection.

  Main differences between selection and switch structure

What do you need to analyze when directing flow of information in each case? Give code examples for if/else structure and switch structure that produce the same result.

  Output of convolution

Convolve sub-image shown below with the 3x3 mean filters. Specify the output of convolution at the center entry of sub-image?

  Developing the circuitry for class project

If number is divisable by 4 or 5, number has to be a multiple of 2 in order to generate an output. If the number is devisable by 3, it has to be a multiple of 3 and 5 to generate an output.

  Consider the broad range of data manipulation features

What are the data manipulation capabilities found in SQL Server 2005? consider the broad range of data manipulation features and provide a summary.

  Network that contains several netware 4.11 servers

Your company has a network that contains several NetWare 4.11 servers and uses IPX as the routing protocol. Each of the network segments has as a minimum  one NetWare server on it. Which of the following responds to a Get Nearest Server (GNS) reque..

  Make a decision structure and a loop structure

A palindrome is a word or phrase that reads the similar forwards and backwards, character for character, disregarding punctuation, case and spaces.

  Build a word document listing the software

The scenario is that you do volunteer work for the small, self-funded community support group. With very little money available, the group has been unable to computerize its operations.

  Recognizing the error in code

Suppose that the variable A is an arrays of ints. Take the following code segment:Boolean flag = false;

  Why appropriate organizational culture is needed

Company X is going to expand its information system. To do this, it is going to select and purchase new hardware and software and re-train its employees. The problem-solving team has been built and has specified hardware, software and staff-traini..

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