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...
Given a list of items, write a program that generates a list of lists of the...
Given a list of items, write a program that generates a list of lists of the following form: [a,b,c,...,z]⇒[[z], [y,z], [x,y,z], ... , [a,b, ... ,y,z]] Hint: Slicing is your friend. please write a python program
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...
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...
Which of the following is not true about designing classes? All methods should be declared private....
Which of the following is not true about designing classes? All methods should be declared private. To test for equality the programmer should define an equals method. In order for class information to be printed instead of a memory address, a toString method should be declared. All class variables should be declared as private. The constructor must be declared as public. The method that builds a class in memory is called the ______. constructor equals toString return private Consider the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT