ce00 Review Exercise

Approved for: Spring 2024

Honors Recitation Instructions

We will use the review exercise below to provide an example for our first recitation discussion. All students are required to carefully review the provided starter code and come prepared to Wednesday's recitation session with written answers to the following questions:

  1. How many instance variables are contained in the Money class? How can you identify an instance variable?
  2. How many instance variables are contained in the Wallet class? Can you think of any other instance variables that might make sense to add to the Wallet class?
  3. There are four unimplemented methods (2 methods, 2 constructors) in the Wallet class. What is the purpose of each of those methods?
  4. Watch the introductory video below. Which concept(s) are you most unfamiliar with from your prerequisite course?
  5. Look through the test cases in WalletDriver.java. Think of at least one additional test case that we could add to more thoroughly test our implementation of Wallet.java.

You are not required to write the code to complete this exercise before Wednesday, but you are certainly encouraged to do so.

Review Exercise

This exercise is designed to review some of the object-oriented concepts from your introductory programming course. If you have trouble implementing any of the methods or understanding any concepts in this exercise, your instructors recommend thoroughly reviewing your introductory course materials and asking questions to fill in any gaps. All concepts in this exercise will be critical moving forward in CSCI 1302.

Prerequisite Knowledge

Getting Started

  1. In your IDE of choice, create a project called cs1302-ce00.
  2. Download Money.java
  3. Download Wallet.java
  4. Download WalletDriver.java
  5. Place Money.java, Wallet.java, and WalletDriver.java in the src folder of your cs1302-ce00 project folder.

Introductory Video

  1. You might find the following introductory video helpful for getting started with the exercise. Please note that this video was created with an older version of this assignment. However, all of the concepts are still relevant.

    https://youtu.be/puduQZisWsc

    IMAGE ALT TEXT

Exercise Steps

  1. Navigate to API Documentation.
  2. The Money.java class is fully implemented for you. Read through the API documentation on the API documentation website to understand the available methods and how to use them.
  3. Your main job for this exercise is to implement Wallet.java. There are four unimplemented methods. However, the signatures are provided for you. The comments in the API documentation contain detailed guidelines that you should follow for implementation. You should read all of the comments before writing any code.
  4. Once you have implemented the methods, execute the WalletDriver.java class which contains a series of unit tests to thoroughly test your implementation. If you do not pass a test, then inspect the test to see what it's doing, and then try to fix your code.

License: CC BY-NC-ND 4.0 License: CC BY-NC 4.0

Copyright © Michael E. Cotterell, Bradley J. Barnes, and the University of Georgia. This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License to students and the public and licensed under a Creative Commons Attribution-NonCommercial 4.0 International License to instructors at institutions of higher education. The content and opinions expressed on this Web page do not necessarily reflect the views of nor are they endorsed by the University of Georgia or the University System of Georgia.