COMPUTER SCIENCE 2
ASSIGNMENT LIST

Assignment #6
NameList
Assigned: Feb 27
Turned in: Mar 8

Assignment Objective: To learn how to use arrays to store and manipulate data.
Input: The user will be able to type information in that will be stored in the array.
Output: The user will see the array and be able to manipulate data in the array
Assessment: Demonstrate that you can write a program that initializes, displayes, and sorts an array. It also allows the user to type information into the array.

  • Have an array of 5 names
  • Ask user to enter the 5 names
  • upcase all names
  • Find the longest name
  • Do some type of comparison
  • Use some other methods


Above and Beyond:
Keep Array on Screen at all times
Menu Driven Program
Sort both ways

 

Assignment #5
Java Applets
Assigned: Feb 17
Turned in: Feb 24

Assignment Objective: To learn how to program and view basic applets.
Input: No input from the user
Output: The applet will display some basic graphic elements.
Assessment: Use of text, fill, draw methods. Some basic explanation in documentation. Change the size of the applet viewing window.
Above and Beyond: The sky is the limit on this one.

Click here to see student's work

Assignment #3
Arithmetic Class
Assigned: Feb 9
Turned in: Feb 16

Assignment Objective: To learn how Java does math. Also to look at the Math class in Java.
Input: User will input two integers
Output: The sum, difference, product, quotient and remainder of the two integers. Additionally the program will display information about 5 methods from the math class using 2 doubles initialized by the programmer.
Assessment: Correct answers in Part 1. Also use and explanation of the 5 methods from the Math Class.
Above and Beyond: More information from the Math class. Could also work on some display elements.

Additional information about each part of the assignment:

Assignment #3 - Part 1

Make an Arithmetic Class - do not worry about objects
Each answer needs to be stored in a variable (sum, difference, product, quotient)
Input: Two integers
Output:

num1 + num2 = sum
num1 - num2 = difference
num1 * num2 = product
num1 / num2 = quotient {this should actually come out as a decimal}
num1 % num2 = mystery {what is "mystery" -- explain in your documentation}

Assignment #3 - Part 2

Create 2 doubles - dub1, dub2
Initialize them with decimal values - must have a decimal - one is negative
Demonstrate 5 methods in the Math Class - explain in output exactly what the method does.
Use both numbers - this will require that you use many of the methods twice.
The following methods must be included:

  • ceil
  • floor
  • round

Assignment #2
Person Class
Assigned: Feb 7
Turned in: Feb 9

Assignment Objective: To use classes and objects to design a working program.
Input: User will input name and age (in years)
Output: "name" is x days old.
Assessment: Use of class (Person). Use of object (student). 2 instance variables. 1 method. (other than the main method). A message that says (Person) is a child, teen, or adult. Also that (Person) is ____ days old.
Above and Beyond: Ask for more information. More accurate age in days. Age in other planetary scale.

Assignment #1
Signed Syllabus
Assigned: Jan 31
Turned in: Feb 2