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

  Determining the closure under operation

Explain whether the following sets closed under following operations? Justify your answer. If a set is not closed under operation, what is its closure under the operation.

  What is required to maintain the data current

This question in not concerned with the effort to initially build/develop and populate a database, but at the place of the ongoing/long term effort to keep the data and DBMS current (up to date and accurate).

  Find sql statements and screenshots of the result

Any other information you would like to retrieve from the database.

  Defining the class counter

Write down the definition of the class counter consisting of: An instance variable named counter of type int. A constructor which takes one int argument and allocates its value to the counter.

  There are many ways to render an object

There are many ways to render an object and the choice depends on the use the work will be put to.

  Proposing the reasonable values

Propose the reasonable values for items in risk register for this asset and threat, and give the justifications for your choices.

  Make a heading that contains the name of the software

discuss a specific virus software, its advantages and disadvantages. make a heading that contains the name of the software you are reviewing. It should be about half-page or less.

  Consider the business impact of any situation

Consider the business impact of any situation

  Valuing the health care

Find the best way in order to leverage value from the health IM / IT investments in today’s health care environment. Give some specific examples in order to support your response.

  How to use the same naming conventions

how to use the same naming conventions and that their programs work together even though they are created independently.

  Make a frame-based application

build a Frame-based application that displays an array of nine buttons on a Panel. Assign the Panel to the Center of your frame. Each button should display the name of a course in your department.

  Program to find smaller between num1 and num2 to output

Program to find smaller between num1 and num2 to output

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