Question

In: Computer Science

Given the following list of classes, attributes and methods, - identify which items are classes, which...

Given the following list of classes, attributes and methods,

- identify which items are classes, which items are attributes and which items are methods;

- identify which class each attribute and method belongs to; and

- suggest a class hierarchy given your list of classes.

*Note - no particular capitalization scheme is used in the list below to differentiate between classes, methods, and attributes.

LandOnStatue, NumberOfLegs, Height, ShoeSize, Eat, Animal, Speak, WingSpan, Age, Peck, Sleep, Horse, LengthOfMane, Move, BeakLength, LengthOfTail, Bird, SaddleUp

Solutions

Expert Solution

class: Animal
attribute: Age, Height,NumberOfLegs, BeakLength,LandOnStatue
method:Eat, Speak, Sleep,


class: Horse
attribute: LengthOfMane, ShoeSize,SaddleUp, LengthOfTail
method: Move


class : Bird
attribute: WingSpan,
method:Peck

Here Animal class is Parent class.

Hourse and Bird are child class.


Related Solutions

Objects, classes, relationships, attributes, and methods Explain these five terms and how they are related. Then...
Objects, classes, relationships, attributes, and methods Explain these five terms and how they are related. Then provide an example to illustrate the main ideas.
Identify five main attributes for each of the following entity classes: a. automobile parts: b. airline...
Identify five main attributes for each of the following entity classes: a. automobile parts: b. airline flights: c. houses: d. insurance policies: e. business expense (such as what an employee may incur on a business trip):
Given the following list of items: a. Classify the items as A, B, or C b....
Given the following list of items: a. Classify the items as A, B, or C b. Determine the economic order quantity for each item (round to the nearest whole unit) Item Estimated Annual Demand Ordering Cost Holding Cost (%) Unit Price H4-010 20,000 55 25 4.5 H5-201 60,200 65 25 6 P6-400 9,800 85 35 30.5 P6-401 14,500 55 35 14 P7-100 6,250 55 35 11 P9-103 7,500 55 45 24 TS-300 21,000 45 30 47 TS-400 45,000 45 30...
SHOW ALL STEPS, FORMULAS, AND EXPLANATIONS Given the following list of items: a. Classify the items...
SHOW ALL STEPS, FORMULAS, AND EXPLANATIONS Given the following list of items: a. Classify the items as A, B, or C b. Determine the economic order quantity for each item (round to the nearest whole unit) Item Estimated Annual Demand Ordering Cost Holding Cost (%) Unit Price H4-010 20,000 55 25 4.5 H5-201 60,200 65 25 6 P6-400 9,800 85 35 30.5 P6-401 14,500 55 35 14 P7-100 6,250 55 35 11 P9-103 7,500 55 45 24 TS-300 21,000 45...
C++ The following is a specification of three classes: Class Vehicle:       Attributes:       Age, an...
C++ The following is a specification of three classes: Class Vehicle:       Attributes:       Age, an integer à The age of the vehicle       Price, a float à The price of the vehicle       Behaviors: Vehicle() à default constructor sets age=0, and price=0.0 setAge()   à Takes an integer parameter, returns nothing setPrice() à Takes a float parameter, returns nothing getAge()   à Takes no parameters, returns the vehicle’s age getPrice() à Takes no parameters, returns the vehicle’s price End Class Vehicle...
Consider the list of animals and their attributes given below cell (CELL_Q3_INPUT). The objective is to...
Consider the list of animals and their attributes given below cell (CELL_Q3_INPUT). The objective is to obtain the print outs in the subsequent cell (CELL_Q3_OUTPUT). Note that the attributes of each animal are 'name', 'species', 'color', and 'age'. You must use collections.namedtuple to add readable attribute references, which then will be used to generate the desired output in CELL_Q3_OUTPUT. # CELL_Q3_INPUT lassie = ('Lassie', 'dog', 'black', 12) buddy = ('Buddy', 'pupper', 'red', 0.5)   astro = ('Astro', 'doggo', 'grey', 15) mrpb...
Financial Statement Items Identify the financial statement (or statements) in which each of the following items...
Financial Statement Items Identify the financial statement (or statements) in which each of the following items would appear: income statement (IS), statement of stockholders’ equity (SSC), balance sheet (BS), or statement of cash flow (SCF). Assets Revenue Cashflow from investing activities Stockholders’ equity Expenses Net change in cash Net Income Liabilities
A deque is a data structure consisting of a list of items, on which the following...
A deque is a data structure consisting of a list of items, on which the following operations are possible: • push(x): Insert item x on the front end of the deque. • pop(): Remove the front item from the deque and return it. • inject(x): Insert item x on the rear end of the deque. • eject(): Remove the rear item from the deque and return it. Write routines to support the deque that take O(1) time per operation. In...
Implement a class Student, including the following attributes and methods: Two public attributes name(String) and score...
Implement a class Student, including the following attributes and methods: Two public attributes name(String) and score (int). A constructor expects a name as a parameter. A method getLevel to get the level(char) of the student. score level table: A: score >= 90 B: score >= 80 and < 90 C: score >= 60 and < 80 D: score < 60 Example:          Student student = new Student("Zack"); student.score = 10; student.getLevel(); // should be 'D'. student.score = 60; student.getLevel(); //...
Enlistee and Private Classes Write an Enlistee class that keeps data attributes for the following pieces...
Enlistee and Private Classes Write an Enlistee class that keeps data attributes for the following pieces of information: Enlistee name Enlistee number Next, write a class named Private that is a subclass of the Enlistee class. The Private class should keep data attributes for the following information: Platoon number (an integer, such as 1, 2, or 3) Years of service (also an integer) Write the appropriate accessor and mutator methods for each class. Once you have written the classes, write...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT