1. Write a tutorial explaining how to represent the basic concepts of object-oriented programming in a language of your choice other than Java.

  2. Describe polymorphism, how it occurs, and its impact on systems programming, including advantages and disadvantages. Give an example.

  3. Define method overriding and method overloading in object-oriented programming languages. Give examples.

  4. Define inheritance and describe three situations in which it would be appropriate. Include a code example.

  5. What are abstract classes, and what are they used for in object-oriented programming languages? Describe at least three situations in which they would be appropriate.

  6. What are the advantages of generic types in object-oriented systems, and when should they be used? Give at least three examples of situations in which this mechanism is useful.

  7. Consider the following statements about object-oriented programming:

    I. Methods define operations in classes.

    II. Classes are abstractions used to represent concepts from the real and computational worlds.

    III. Class instances are usually created using constructors, which create objects of a particular class.

    Select the correct alternative:

    1. Only statement I is incorrect.
    2. Only statement II is incorrect.
    3. Only statement III is incorrect.
    4. Only statements I and III are incorrect.
    5. None of the statements is incorrect.
  8. Select the correct statement about inheritance in Java:

    1. An object of a superclass can always be assigned to a variable whose type is one of its subclasses without a compile-time error.
    2. Inheritance is the only way to access methods and fields outside a class.
    3. It is impossible to completely replace a superclass method’s behavior; it can only be extended.
    4. Overloading defines multiple methods with the same parameter in a superclass so that its subclasses can use them.
    5. A subclass inherits all non-private fields and methods of its superclass and can add new fields and methods.
  9. Create classes for managing bank accounts. Accounts can be savings or checking accounts. It must be possible to:

    • Get an account’s balance.
    • Change an account’s balance.
    • Withdraw money from an account.
    • Deposit money into an account.
    • Transfer money to another account.
    • Block and unblock an account, as in account1.block() and account1.unblock(). If an account is blocked, only its balance can be read or changed.
  10. Implement the Minesweeper game in Java for the terminal.


This article is adapted from content in Orientação a Objetos com Java, a book by Eduardo Kessler Piveta.