mdinfotech.net  



  • SAVE EVERY PROGRAM YOU WRITE ON THE H (Host) DRIVE.
  • Lots of 100/80/60 quizzes based on the reading assignments
  • There are a few small assignments to be handed in.
  • How to get an A on Programming Assignments: Program Marking Criteria

Resources
Important Dates
  1. Wednesday, February 20 12-3 - Canadian Computing Contest
  2. March 16 - March 31: Spring Break
  3. April 8: End of Term 2 and Game Due
  4. APCS Exam: May 17, 12 noon
Intro to the Course and Lab
  • lab rules, exactly what does "monitors OFF!" mean?
  • saving and renaming files, creating folders
  • the "Back-up" talk: Google Drive and USB Sticks
  • Printing
  • Typing - do you need it?
    Read We Are Typists First, Programmers Second. Test your code typing speed Typing.io.
Programming with Eclipse Resources for Installing Eclipse at Home
  • At HOME: Download Eclipse IDE for Java Developers:
Other Eclipse Resources
What is Computer Science?
  1. Define in class. Class Notes
  2. Browse Wikipedia: Computer Science.
  3. What CS topics are of interest to you?

Hardware Components You Need to Know
  • I/O Devices
  • RAM
  • Hard Drive
  • CPU
Software Components You Need to Know
  • Operating System
  • Browsers
  • Text Editors
  • Graphics Editors
  • IDE's
  1. What is a programming language? History of Programming Languages
  2. How does Java work? (compiler > bytecode > JRE) (JVM Video)
  3. Homework: Review all of CS 11 and CS 12 Java Units
  4. Quiz
To write the Canadian Computing Contest on Wednesday Feb 20 12 - 3:
  1. Register (http://cemc.uwaterloo.ca/contests/computing/computing-grader.html). You will need the school number : 091301202
  2. Get me to approve your registration.
  3. Do practice questions. (http://cemc.uwaterloo.ca/contests/computing/computing-grader.html)
  4. Ensure you can submit solutions that are accepted by the online grader BEFORE the day of the test. A number of students submitted correct solutions last year but got marked with a zero because they did not follow the instructions.
Console Input and Output
  1. How to get user input from the command line
  2. Run this program using Eclispe: ConsoleInput.java
Input and Output From Dialog Boxes
  1. Run this program using Eclispe: Greeting.java
Exception Handling
  1. See Greeting.java for example.
  2. Try Statements
  3. Exception Handling
Resources:
The precondition statement indicates what must be true before a method is called. The postcondition statement indicates what will be true when a method finishes its work. They go in the comments of a method.
// Preconditions: x >= 0
// Postconditions: returns the value of the square root of x
public static double squareRoot(double x) {
 return Math.sqrt(x);
}
The method calls squareroot(10) and squareroot(5) meet the precondition, but the method call squareroot(-1) does not.
//   Precondition:  letter is an uppercase or
//   lowercase letter (in the range 'A'...'Z' or 'a'...'z').
//   Postcondition:  returns true if letter is a vowel;
//   otherwise the value returns false
public static boolean isVowel(char letter)
In general:
  • When you write a method, you should make every effort to detect when a precondition has been violated.
  • If you detect that a precondition has been violated, then print an error message and end the program

Write a program that uses the Scanner class to read the (x,y) coordinates for two points. For each point, the input should be typed in with the format x, y, and the program will parse the values x and y out of the input. Compute the distance between the two points using the distance formula. Catch exceptions that may be thrown by the calculation. Use Math.pow() and Math.sqrt() where applicable.

  1. Create a 10x10 integer array, initialized to 0
  2. Write a Point with two instance variables (int x and int y) and get and set methods for each
  3. Write a test driver with a minimum of the six methods listed below:
    void init(int  board, Point p) - initializes board to 0, and sets start position to 1
    int sum (int  board) - returns sum of the board
    
    // the following methods return true if the move is successful,
    // or false if an ArrayIndexOutOfBounds Exception is thrown
    boolean north (int  board, Point p) - moves position north
    boolean south (int  board, Point p) - moves position south
    boolean east (int  board, Point p) - moves position east
    boolean west (int  board, Point p) - moves position west
    
    
    		 
  4. 0,0 is the top left.
  5. read in a file where:
    • first line is the x position to start at
    • second line is the y position to start at
    • the remaining lines of the file each contain N, E, S, W for North, East, South or West
  6. set the starting Point x,y to one in the array.
  7. for each line read, move current position by one space in that direction. North is up, East is right, South is down, West is left
  8. if the array element of the new position contains 0, replace it with a 1, otherwise multiply its current value by 2
  9. continue until the End of File is reached OR an ArrayIndexOutOfBounds Exception is thrown (print an error and end program) (that is not handled by north, south, east or west).
  10. If the end of file is reached, add up all the elements of the two dimensional array and output that number to the console.
  11. If any invalid data is read from the file, print invalid data and end the program.

The class will be split into groups to come up with two test cases each. These test cases will be used to evaluate the lab.

  1. Spires of Vulcan
  2. Watch this
  3. What is recursion: watch this
  4. When to choose recursion over iteration, watch this
  5. Discuss how these common algorithms can be recursive and iterative: factorial, isPrime, Fibonacci
Resources
  1. Java Recursion
  2. Fibonacci Problem
  3. Recursive Algorithms
AP Textbook: Chapter 7 Recursion
Examine this code: Fibonacci. Now write similar programs that compare the runtime and number of method calls for factorial and isPrime (both recursive and iterative solutions)

A word is considered emulike if it contains the letters: e, m, u in it, if any order. For example, the following words are emulike: "mustache", "umbrella", "temperature", and "guatemala".

Write a program WordLike.java to support the following features.

  • Write this method, any solution that works is acceptable:
    /* Precondition: word is a single word
     * Postcondition: returns true if word is emulike, otherwise false
     */
    public static boolean emulike(String word)
    
  • Write this recursive method
    /* Precondition: foo and bar are single words
     * Postcondition: returns true if all the letters of foo are contained in bar
     */
    public static boolean foobarlike(String foo, String bar)
    
    Examples:
    foobarlike("left", "felt") returns true.
    foobarlike("ado", "dormant") returns true.
    foobarlike("fold", "skyfall") returns false.
    
  • Write this recursive method:
    /* Precondition: sentence is a sentence in the form of a string array
     * Postcondition: returns a string of the leftlike words in the sentence
     */
    public static String  keepLeftlike(String    sentence)
    
    Example:
    String    a = {"this", "stressful", "time", "on", "the", "twelfth", "felt", "extremely", "uneventful"};
    keepLeftlike(a) returns "stressful twelfth felt uneventful"

Use the skeleton code below:

public class Wordlike {
  public static void main(String    args) {
    System.out.println("Testing emulike: ");
    System.out.println("emulike(\"mustache\") is " + emulike("mustache"));
    System.out.println("emulike(\"horses\") is " + emulike("horses"));
    System.out.println("Testing foobarlike:");
    System.out.println("foobarlike(\"ado\", \"dormant\") is " + foobarlike("ado", "dormant")); 
    System.out.println("foobarlike(\"fold\", \"skyfall\") is " + foobarlike("fold", "skyfall"));
    String <> a = {"this", "stressful", "time", "on", "the", "twelfth", "felt", "extremely", "uneventful"};
    System.out.println("Testing keepLeftlike:");
    System.out.println("keepLeftlike(a) is " +  keepLeftlike(a));
  } 

  /* Precondition: word is a single word
   * Postcondition: returns true if word is emulike, otherwise false
   */
  public static boolean emulike(String word) {
     ...
  }

  /* a recursive method
   * Precondition: foo and bar are single words
   * Postcondition: returns true if all the letters of foo are contained in bar
   */
  public static boolean foobarlike(String foo, String bar) {
     ...
  }

  /* a recursive method
   * Precondition: sentence is a sentence in the form of a string array
   * Postcondition: returns a string of the leftlike words in the sentence
   */
  public static String keepLeftlike(String    sentence) {
     ...
  } 

}
O(1), O(n), O(n^2), O(log n), O(n log n)

Resources
  1. Big O Notation Video
  2. Wikipedia
Note: For the AP Exam, you are required to know the "analysis of programs or algorithms in order to understand their time and space requirements when applied to different data sets." and "the relative running time of " search and sort algorithms. APCS Course Description.

Required for AP:

  1. searching in ordered and unordered lists
  2. Sequential/Linear O(n) vs Binary O(log n) searches
  3. Sorting - O(n2)
    • insertion
    • selection
    O(n log n)
    • merge
Resources
  1. Sorting Algorithms Compared
  2. HTML5 Canvas Demo: Sorting Algorithms
  3. Binary Search: Demo, Code
  4. Wikipedia:

In class activity: Each student will be assigned the Insertion, Selection or Merge Sort. Learn it. Get together in a group and demonstrate it to the class.

AP Textbook: Chapter 8 Sorting and Searching

Write a class that contains methods implementing the
  • iterative Linear Search
  • iterative and recursive Binary Search
  • iterative and recursive Insertion Sort,
  • iterative and recursive Selection Sort,
  • recursive Merge Sort.
  1. Create 4 sample arrays of sizes 10, 100, 1000 and 10000 initialized with random numbers between 0 and 5000.
  2. Write a main method that calculates the time each alogorithm takes to sort each array or the time it takes for a "worst case scenario" search, that is, the elements being searched for is not in the array.
  3. You will need to use System.nanotime() WITHIN the methods. Otherwise you will be timing method calls as well.
  4. Run each test 1000 times and calculate the average the search time for each data size.
  5. Display the output in a table like the one shown below:
                Average times:
                             | 10 elements  | 100 elements  |  1000    | 10 000  | 10 elements 
                -------------------------------------------------------------------------------
                Linear Src   |           ns |            ns |          |          |  
                -------------------------------------------------------------------------------
                Binary Src   |           ns |            ns |          |          |  
                -------------------------------------------------------------------------------
                Binary Rec   |           ns |            ns |          |          |  
                -------------------------------------------------------------------------------
                Insertion It |           ns |            ns |          |          |  
                -------------------------------------------------------------------------------
                Insertion Rc |           ns |            ns |          |          |  
                -------------------------------------------------------------------------------
                Selection It |           ns |            ns |          |          |  
                -------------------------------------------------------------------------------
                Selection Rc |           ns |            ns |          |          |  
                -------------------------------------------------------------------------------
                Merge Rc     |           ns |            ns |          |          |  
                
Run this code:
              
int sum = 0, p = 1;
for (int count = 1; count <= 50; count++)
{
     sum += p;
     p *= 2;
}
System.out.println(sum);
What is the output? Why?
Barron's AP Text Chapter 2
  1. Objects
  2. Classes
  3. public, private and static
  4. methods: constructors, accessor and mutators
Resources
  1. Java for students: Take Car,If You Don't Object
  2. Excellent intro to OOP
  1. Class relationships
    • associations - a use relationship, when two classes are aware of each other through such as one class method accepting a parameter from another class type.
    • aggregation - a has-a relationship. An aggregate object is any object that has other objects as instance data.
  2. Object Interactions
    • Driver Programs - programs used to test methods and classes
    • Isolated Tests - test each class/method on its own, separate from other code
    • Using the Eclipse Debugger
  3. aliases - when two references point to the same object.
    Foo f1 = new Foo();
    Foo f2 = new Foo();
    			   
    f1 and f2 are two different Foo objects
    f1 = f2;
    			   
    The address stored in f2 is now also stored in f1. f1 and f2 are aliases of each other.
In Barron's AP Text Chapter 2
  1. Encapsulation: the packing of data and functions into a single component
  2. static final variables
  3. static vs instance methods
  4. scope and this
  5. References and null
  6. passing objects as parameters
    • references of passed objects are passed by value
    • "formal parameter" - the parameter in the method header
    • "actual parameter" - the parameter passed to the method call
    • the current value of the actual parameter is copied into the formal parameter
    • when an object is passed to a method, a reference to that object is passed, and the formal parameter and the actual parameter become aliases of each other
Resources
  1. Intro to OOP
This exercise is a published lab by The College Board, who sets the AP CS curriculum. This lab uses "Chatbots" to review Object Oriented concepts covered in Computer Science 12. Download the Magpie Lab (PDF). Ask Ms. Wear to make the source code available on the Wear_IT drive.

There are a number of questions that need to be answered in this lab. Copy the Activity number and questions into a google document titled "AP Magpie Lab" and answer all the questions in the document.

  • Day 1:
  • Intro to NLP - Read the intro and the last two pages of the document.
  • Activity 1 - With a partner, complete this activity.
  • Activity 2 - Individually, complete this exercise to become familiar with the magpie code.
  • Activity 3 - Learn about JavaDocs commenting and how the relate to the API, and to trace method calls. Complete this activity.

  • Day 2:
  • Activity 4 - Day 2 - Improve the chatbot.
  • Activity 5 - Day 2 - Upgrade the implementation.
  • Chatbot Challenge - Day 2 - We will have the chat bot's interact with each other. Which two can have the most numbers of sensical interactions?
Watch this video on inheritance.

Read Barron's AP Text Chapter 3.

  1. Superclass and Subclass
  2. class hierarchy: parent class, child class
  3. is-a relationship
  4. method overriding - read about @override: Predefined Annotation Types.
  5. protected keyword
  6. extends keyword
  7. super keyword
  8. declaring subclass objects
  9. know the modifiers
                | Class | Package | Subclass | World
    ————————————+———————+—————————+——————————+———————
    public      |  y    |    y    |    y     |   y
    ————————————+———————+—————————+——————————+———————
    protected   |  y    |    y    |    y     |   n
    ————————————+———————+—————————+——————————+———————
    no modifier |  y    |    y    |    n     |   n
    ————————————+———————+—————————+——————————+———————
    private     |  y    |    n    |    n     |   n
    
    y: accessible
    n: not accessible
    					   

You have a stretchable cloth grocery bag that can hold up to 8.5 kg of groceries. You have won a contest where you get two minutes to fill your grocery bag with any items from the MINI-MARKET grocery store. These are the items available to you:

  1. 2 kg package of chicken for $15
  2. 1 kg bag of flour for $2.50
  3. 0.25 kg can of beans fror $2.40
  4. 0.5 kg box of cereal for $1.20
  5. 0.3 kg box of cookies for $3.99
  6. 1 kg bottle of soda for $0.99
  7. 0.3 kg can of Spam for $4.99

Create a GroceryItem class as shown below:

public class GroceryItem {
       double weight = 0;
       double cost = 0;
       String item = "";
      
	  // write required methods
	  

}

You are only allowed at most 2 of each item. Your goal is to fill the grocery bag so that the combined weight of all the items is <= 8.5 kg while maximizing the total value of the items. You may choose what type of solution to write.

What are the time and space requirements of your algorithm?

Use the skeleton code below:
import java.util.ArrayList;

public class Groceries {

    private static int counter = 0;

    private static GroceryItem <> groceryItems = {
            new GroceryItem(0.75, 2.5, "flour") ,
            new GroceryItem(0.25,2.4,"beans"),
            new GroceryItem(0.5,4.50, "cereal"),
            new GroceryItem(0.3, 3.99,"cookies"),
            new GroceryItem(1, 0.99, "soda"),
            new GroceryItem(0.3,4.99, "Spam") 
            };

    /* Precondition: b is an array of groceries already in the bag
     * Postcondition: returns the optimized bag
     */
    private static ArrayList bestBag(ArrayList   b) {
        
        // counts recursive calls
        counter++;
        if(counter % 10000000 == 0)
            System.out.println("# method calls : " + counter);
      
    } // bestBag

    // returns the weight of bag b
    public static double bagWeight(ArrayList  b) {

    }

    // returns the value of bag b
    public static double bagCost(ArrayList  b) {

    }

    // returns number of items of i in bag b
    public static int bagCount(ArrayList  b, String i) {

    }

    // prints contents of bag b
    public static void printBag(ArrayList  b) {

    }

    public static void main (String <> args) {
        ArrayList  temp = new ArrayList();
        long startTime = System.nanoTime();
        ArrayList  perfectBag = bestBag(temp);
        long endTime = System.nanoTime();
        long duration = (endTime - startTime);

        System.out.println("Time: " + duration/1000 + " ms");
        System.out.println("# method calls = " + counter);
        System.out.println("# items = " + perfectBag.size());
        System.out.println("weight items = " + bagWeight(perfectBag) + " kg.");
        System.out.println("cost items = $" + bagCost(perfectBag));
        printBag(perfectBag);
    }

} // Groceries
 


Evaluation Criteria tba
Covers everything up to and including here.
  • Interfaces: read pages 140-145 - video
  • Tell Ms. Wear to give you this in-class exercise.
    Ms. Wear's Notes on the subject

    Things to know from Barron's AP Text Chapter 4:
    1. inheriting from the Object class (p 171)
    2. Math Class, String Class (review from ICTP 12)
    3. Random Numbers
    The following links describe what parts of Java you need to know for the AP Exam:
    Java Subset
    AP Java Quick Reference
    Ms. Wear's Notes on the subject

    1. Generic Types
    2. (p 239) Auto-boxing and -unboxing. Not on AP exam but allowed in Free Response Questions
    3. Integer and Double classes p 177-180
    1. Download this starter code: download here
    2. Change the Account class so that funds can be moved from one account to another. Think of this as withdrawing money from one account and depositing it into another.
    3. Also, make it let a user open an account with just a name and an account number, and a starting balance of 0.
    4. For evaluation, you will be given a Banking class which contains a driver to test your Account class. See example below:
    Sample Test Case:
          Account acct1 = new Account ("Ted Murphy", 12345, 214.56);
          Account acct2 = new Account ("Anita Gomez", 54321, 20.00);
         
    
          System.out.println ("Murphy balance after deposit: $" + acct1.deposit (14.58));
          System.out.println ("Gomez balance after deposit: $" + acct2.deposit (300.00));
    
          System.out.println ("Gomez balance after withdrawal: $" + acct2.withdraw (100.00, 2.00));
    
    	  System.out.print("\nWithdraw $800 from Gomez account: ");
          acct2.withdraw (800.00, 0.0);  // exceeds balance
    
          acct1.addInterest();
          acct2.addInterest();
         
          System.out.println ("\nAccount Balances:");
          System.out.println (acct1);
          System.out.println (acct2);
         
    
          // transfer $50 from account 1 to account 2
    	  System.out.println ("\nTransfer $50 from Murphy to Gomez:");
          acct1.transfer(50, acct2);
    
       
    
          System.out.println (acct1);
          System.out.println (acct2);
          
    Sample Output
    Murphy balance after deposit: $229.14000000000001
    Gomez balance after deposit: $320.0
    Gomez balance after withdrawal: $218.0
    
    Withdraw $800 from Gomez account: 
    Error: Insufficient funds.
    Account: 54321
    Requested: $800.00
    Available: $218.00
    
    Account Balances:
    12345	Ted Murphy	$237.16
    54321	Anita Gomez	$225.63
    
    Transfer $50 from Murphy to Gomez:
    12345	Ted Murphy	$187.16
    54321	Anita Gomez	$275.63      
          

    A Lockable object is an object whose regular methods are secured: if the object is locked, the methods cannot be invoked; if it is unlocked, they can be invoked.

    Design a Java interface called Lockable that includes the following methods: setKey, lock, unlock, and locked.

    • The setKey, lock, and unlock methods take an integer parameter that represents the key. The setKey method establishes the key.
    • The lock and unlock methods lock and unlock the object, but only if the key used is correct.
    • The locked method returns a boolean of true for locked and false for unlocked.

    Redesign the Account class so that it is lockable.

    For evaluation, you will be given a Banking class which contains a driver to test your Account class.

    Sample Test Case
          Account acct1 = new Account ("Ted Murphy", 12345, 214.56);
          Account acct2 = new Account ("Anita Gomez", 54321, 20.00);
    
          System.out.println (acct1);
          System.out.println (acct2);
          
          System.out.println("\n---------Lock Account 1 and Try to Withdraw/Transfer/Deposit/AddInterest --------");
          acct1.setKey(333);
          acct1.lock(333);
    	  if (acct1.locked()) {
            System.out.println("1. Locked is on");
          } else {
            System.out.println("1. Locked is off");
          }
          System.out.println ("Withdraw $200: " + acct1.withdraw(200, 0));
          System.out.println ("Transfer $200: " + acct1.transfer(200, acct2));
          System.out.println ("Deposit $100: " + acct1.deposit(100));
          System.out.println ("Add Interest: " + acct1.addInterest());
    	  
          System.out.println();
          System.out.println (acct1);
          System.out.println (acct2);
          
          System.out.println("\n---------Unlock Account 1 and Try to Withdraw/Transfer/Deposit/AddInterest--------");
          acct1.unlock(333);
          if (acct1.locked()) {
            System.out.println("1. Locked is on");
          } else {
            System.out.println("1. Locked is off");
          }
          System.out.println ("Withdraw $200: " + acct1.withdraw(200, 0));
          System.out.println ("Transfer $200: " + acct1.transfer(200, acct2));
          System.out.println ("Deposit $100: " + acct1.deposit(100));
          System.out.println ("Add Interest: " + acct1.addInterest());
    	  
          System.out.println();
          System.out.println (acct1);
          System.out.println (acct2);
         
    Sample Output
    12345	Ted Murphy	$214.56
    54321	Anita Gomez	$20.00
    
    ---------Lock Account 1 and Try to Withdraw/Transfer/Deposit/AddInterest --------
    1. Locked is on
    Withdraw $200: 214.56
    Transfer $200: false
    Deposit $100: 214.56
    Add Interest: 214.56
    
    12345	Ted Murphy	$214.56
    54321	Anita Gomez	$20.00
    
    ---------Unlock Account 1 and Try to Withdraw/Transfer/Deposit/AddInterest--------
    1. Locked is off
    Withdraw $200: 14.560000000000002
    Transfer $200: false
    Deposit $100: 114.56
    Add Interest: 118.56960000000001
    12345	Ted Murphy	$118.57
    54321	Anita Gomez	$20.00     
         
    Ms. Wear's Notes on Polymorphism

    Barron's AP Text Chapter 3
    1. references and class hierarchies (p. 134)
    2. Polymorphism - tutorial: applies only to overridden methods in subclasses (p 135)
    3. static (early) binding and dynamic (late) binding - explained(p 135)
    4. downcasting (p 136)
    Ask Ms. Wear to give you the Polymorphism Exercise.
    Class Diagrams
    Know these symbols
    1. Abstract Classes - read pages 138-140 in Barron's AP Text
    2. In pairs, complete the Sample Written Response Question on pages 145-147.
    This exercise is a published lab by The College Board, who sets the AP CS curriculum. This lab uses photo manipulation to implement Object Oriented concepts inheritance and interfaces. Download the Elevens Lab (PDF). Ask Ms. Wear to make the source code available on the Wear_IT drive.
    • Activity 4 - Complete this exercise. At the end you will have the ability to shuffle a deck of cards.
    • Activity 11 - Complete this exercise. You will learn about the role of simulations in testing software.
    1. Implementing Comparable (p 141)
    2. As a group, examine this Sample Program that implements Comparable: Sample Code, Test Driver

    What you need to know:

    In the Java Collection Framework two abstract data types exist to check whether one object is larger, equal, or less to another object: Comparable and Comparator. Comparable is implemented by the class of the objects to compare. In that case only one ordering exist for these objects. Sometimes it is desirable to implement different orderings for the same class. In this case you can implement for each ordering the interface Comparator in a separated class. AP only requires you to know Comparable.

    Comparable defines the method int compareTo(Object o) which returns 0 if the object is equal to o, a negative value if o is less, and a positive value if it is larger the object on which this method has been invoked. Follow the link and carefully read the specification of Comparable. The class String for instance implements Comparable.


    The Exercise

    One specific ordering for the Card class created for the Elevens Lab is to order the card by suit, then by value. Suit order is Hearts, Spades, Diamonds, Clubs.

    1) Implement this ordering in class Card by implementing Comparable.

    Another specific ordering for the Card class created for the Elevens Lab is to order the card by value, then by suit. Suit order is Hearts, Spades, Diamonds, Clubs.

    2) Implement this ordering in class Card. Create a class variable boolean useBySuitThenValueSort;. When useBySuitThenValueSort; is true, the first sort algorithm is used, when it is false, the second sort algorithm is used.

    3) Test both sort implementations to sort a shuffled Deck of cards. (used by Arrays.sort() or Collections.sort() )

    Read Barron's AP Text Chapter 6 p 238 - 243
    1. The Collections API (p 238), Collections Tutorial
    2. A list is a Collection: List interface (p 240)
    3. An ArrayList is an implementation of the List interface (p 241)
    4. Generics, Tutorial
    Do all the questions at the end of chapter 6.
    Covers everything.
    Read p. 243-246 of the textbook.
    1. an iterator is an object whose sole purpose is to traverse a collection, one element at a time
    2. there is an Iterator Interface
    3. the methods of the interface are
      • hasNext - returns true if there is at least one more element to be examined
      • next - returns the next element in the iteration, if no elements remain, throws an exception
      • remove - deletes from the collection the last element that was returned by next. Throws an exception if next has not yet been called.
    4. See examples on pages 244-245
    You and a partner will complete the following project: RFS Project Description

    Please take the time to complete the following course evaluation. It will be used for future course offerings.

    Course Evaluation