News Ticker

Menu

Browsing "Older Posts"

Browsing Category "CS 112"

Obligatory Objects In Java

Sunday, 7 February 2016 / No Comments

Project Overview

Problem Sets

This project has 3 problems to complete. All of them involve creating new classes which do not exist in Java. The first two problems involve modeling simple linear equations of two variables using classes. This will introduce the idea of invariants: properties that should always be true about a class after one of its methods completes. The third problem revisits the queues of the previous project and implements them in a proper, Java-esque fashion as an object with associated methods. The honors problems build on this to improve the efficiency of the queue methods and makes it more flexible to allow for expansion.

Scanner Practice in Java

Saturday, 6 February 2016 / No Comments

Rationale

Reading data from stored files is an essential skill. Reading from arbitrary sources such as the user, a string, or a network location usually follows a similar pattern to reading from files. Completing this lab will illustrate how Java's Scanner class provides a uniform mechanism to read from a variety of sources. To complete the lab, one must understand several key elements surrounding Scanner input: