[an error occurred while processing this directive]

Individual Work 4 - Practice: Loops

[an error occurred while processing this directive]

Description

In this assignment you will not be using Processing. Instead, you will be practicing using loops. The down-side is that you will not be creating anything visual. The up-side is that as you go along, Eclipse will use something called JUnit testing to let you know if your code works.

Directions

Read all directions before beginning your work.

  1. Start by importing IW4Loops.zip into Eclipse.
  2. In the Project Explorer, open the src folder then the (default package) folder. Notice three files:
    1. IW4.java: you will edit this file
    2. Coin.java: do not edit this file
    3. TestMyLoops.java: do not edit this file
  3. The IW4.java file contains five method readers and default return statements. You will remove the return statement currently in each method and replace it with the result of the computations described in the corresponding comments.
  4. Once you think you have a solution to one of the problems, run the program and check the results in the JUnit test window.

Resources

The resources below are the only resources you should use in completing this assignment. In particular, do not use the CSC 130 tutors and do not search any electronic resources such as the Web for sample code. You may visit the tutors for general guidance, but they have been instructed not to help with the specific assignment questions.

Grading

Recall that individual work assignments are worth 50 points each. Refer to the syllabus for more course grading information.

Submission

Submit by taking two actions: upload a java file and make a printout. Details are below.

  1. Ensure that your name appears as a comment at the top of the IW4.java code file.
  2. Make a printout of the IW4.java code file. Use duplex if possible so you submit fewer pieces of paper. Ensure that each method prints entirely on one side of a page - avoid splitting method code across pages. If you have multiple sheets, staple them. Print the file before class starts, not during class.
  3. Upload your IW4.java file to the appropriate Moodle page. Do not export your code and do not submit a zip file. Just submit the single .java file.
[an error occurred while processing this directive]