1.(TCO 2) Keeping in mind all object-oriented programming best practices, create a class for a Keyboard, with the following specifications:
• Specify two data members
• Default Constructor
• Overloaded Constructor which takes both data member values as input.
• Generate a unique identification number for each object instantiated from this class. Use a static data member to keep track of the identification number last assigned to an object so that duplications will not occur. Code the necessary portion of the class definition so as to support this requirement.
• Show a statement which instantiates an object of this class using the overloaded constructor.
You do not need to provide any accessor/mutator methods or other methods.
10. (TCO 8) Briefly describe which elements of a class use the Pascal case, and what are the best practices regarding the naming of these elements.
11. (TCO 2) Sometimes the terms Encapsulation and Data/Information Hiding in object-oriented programming are used interchangeably. However, they have differences. Please explain
12. (TCO 4) When you create your own transitive inheritance chains, why should you place fields and methods at their most general level? What are the advantages?
13. (TCO 6) What is static binding? What is dynamic binding? How do you distinguish between static binding and dynamic binding?
14. (TCO 2) 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.
Brew, DecreaseTemperature, Manufacturer, MinCups, Price, TurnOff, Oven, MaxTemperature, BrewStrength, NumberOfRacks, IncreaseTemperature, TurnOn, StartTimer, CoffeeMaker, KitchenAppliance, MaxCups, YearBuilt, Grind
15. (TCO 2) Briefly describe what an Interface is and how it can be used in an object-oriented program. Provide example pseudocode showing how an IShape Interface might be constructed.
Ask Your Question
We have verified professionals who are ready to answer your question.
Save Time and Money
We choose experts who can quickly answer your question and that suit your budget.
Get Your Answer
Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.