Review Questions
- What is an object (from the perspective of reality)?
- What is an object (from the perspective of object-oriented software development)?
- What are the differences between classes and objects?
- Explain the differences between encapsulation and information hiding. How are these two concepts related?
- List the private and public characteristics (properties and methods/operations) for every type of object in the “books in a bookstore” scenario. Why do you need these characteristics?
- Distinguish between the programming approach used in procedural programming and object-oriented programming.
- Discuss the validity of the following statement: The object-oriented programming approach is ideal for simulating real-world problems.
- Consider the scenario of buying books from a bookstore. Outline the objects in such a transaction together with the messages exchanged.
- Given the class definition Rectangle below, describe the structure of any three instances of the Rectangle.
class Rectangle {
Attributes:
length
width
Methods:
getLength() { return length }
getWidth() { return width }
draw() { ... }
}
- Distinguish between a client and a server in object-oriented programming, as opposed to network programming.
Updated July 29 2020 by FST Course Production Staff