Colorado State University

Recitation R13 - Program Correctness and the Fraction Class
Spring 2016

CS160: Foundations in Programming


Preview

Part I: Part II:

Announcements

You will have until Sunday midnight to finish and turn in the recitations.
Don't forget to click on the link for the final-practice Hackerrank problems. I reserve the right to add problems until Sunday midnight. This will be ungraded but will serve as a portion of the study guide for your final.

Quiz Four

In Eclipse create a Q4 project and download the following files and follow the instructions handed to you by your TA. Please exit out of all tabs that do not pertain to the quiz.
You will have 30 minutes to complete the quiz.

Set Up

In eclipse create an R13 project and download the following three files:

Part I.I: Enabling Assertions

There are several ways of debugging your code. One way is through visual inspection. Another way is by putting print statements in your code so that you can see what the values of your variables are changing to throughout the program.
In this lab we will offer an additional resource called assert statements.

Part I.II: Program Correctness

Answer the questions in the associated text document. You can use the class to test ranges. It would be a good idea to loop through the specified ranges and make sure you are getting all the right numbers for the pre and post conditions.

The Fraction Class

In this section you'll complete the Fraction class! We will talk about a few topics here that will really help jump start you into the next semester. Let's get ready to do some coding!

Submitting your recitation to Checkin

You will need to submit the following three files: To do this:

Hackerrank

Here it is! It will be changing a lot over the next few days.
Submit your R13.jar file (with the text file) to Checkin to receive credit.

© 2016 CS160 Colorado State University. All Rights Reserved.