akosiraff

Keeping in mind all object-oriented programming best practic

Mar 5th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. Download: http://solutionzip.com/downloads/keeping-in-mind-all-object-oriented-programming-best-practices/
  2.  
  3. 1.(TCO 2) Keeping in mind all object-oriented programming best practices, create a class for a Keyboard, with the following specifications:
  4. • Specify two data members
  5. • Default Constructor
  6. • Overloaded Constructor which takes both data member values as input.
  7. • 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.
  8. • Show a statement which instantiates an object of this class using the overloaded constructor.
  9. You do not need to provide any accessor/mutator methods or other methods.
  10. 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. 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. 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. 13. (TCO 6) What is static binding? What is dynamic binding? How do you distinguish between static binding and dynamic binding?
  14. 14. (TCO 2) Given the following list of classes, attributes and methods,
  15. - identify which items are classes, which items are attributes and which items are methods;
  16. - identify which class each attribute and method belongs to; and
  17. - suggest a class hierarchy given your list of classes.
  18. *Note – no particular capitalization scheme is used in the list below to differentiate between classes, methods and attributes.
  19. Brew, DecreaseTemperature, Manufacturer, MinCups, Price, TurnOff, Oven, MaxTemperature, BrewStrength, NumberOfRacks, IncreaseTemperature, TurnOn, StartTimer, CoffeeMaker, KitchenAppliance, MaxCups, YearBuilt, Grind
  20. 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.
  21.  
  22. Download: http://solutionzip.com/downloads/keeping-in-mind-all-object-oriented-programming-best-practices/
Advertisement
Add Comment
Please, Sign In to add comment