CEL - Open-Ended Activity (Lesson)

APCompSci_LessonTopBanner.png

Open-Ended Activity

Introduction

The goal of this lab activity is to allow you to demonstrate your knowledge of inheritance in a way that you find interesting and engaging. The use of Celebrity GUI is intentionally not included in the list of requirements; however, it’s possible that you will want to continue to work with the given classes from this lab.

Open-Ended Activity

Spend a few minutes reviewing the requirements of the open-ended activity.

  • Create a superclass
  • Create at least one subclass from the superclass
  • Override at least one method from the superclass
  • Create a program with a main method
  • Utilize polymorphism

In addition, review the scoring guidelines so that you understand what you’ll be expected to explain once you’re done completing your program.

Your selected program can be anything that you choose that meets the requirements and allows you to demonstrate your understanding.

Lab content from the College Board.

Program Review Questions

Once your program has been implemented and tested, answer the following questions on your own:

  1. Why did you choose to implement this program?
  2. Describe the development process used in the completion of the project.
  3. Describe another class that could be designed as a subclass to the superclass you created. Describe additional attributes and behaviors for this new class and explain how this subclass would be useful.
  4. Create the inheritance UML diagram for the classes you created.
  5. Identify one segment that uses polymorphism. Other than specific syntax, describe how implementing this program without inheritance would change the complexity of your program, using your code segment as an example.

Scoring Guidelines and Notes

Click below to review the scoring guidelines for this lab.

 

Lab Debrief

Inheritance is a tool in computer science used to help organize code and mimic real-world relationships.

1) How was inheritance used in this lab?


2) What are some other applications of inheritance that you encounter in your everyday life or could see using future programs?


3) What are some specific challenges that you imagine computer scientists face when trying to utilize inheritance?

Methods and classes in the API (such as those used in GUIs) are used to allow for quick, reliable development of your programs and make your code more readable. Being able to read and understand the API for existing classes is an important skill.

4) Consider two of the methods that you used in this lab that were part of the Java API. What specific task did each of them perform?


5) Describe how the use of a GUI in a program makes it easier for a user to interact with the program.


6) Explain the tradeoff between the complexity of developing a program that utilizes a GUI with the complexity of using a program that does not utilize a GUI.

APCompSci_LessonBottomBanner.pngIMAGES CREATED BY GAVS