Assignment 4 Instructions 1 Essay examples

Submitted By chrisP777
Words: 521
Pages: 3

Assignment 4 Instructions
Submit all of your assignments in a zip file. Your zip file must include the .java and .class files as well as a Word document with a screen shot of your program running.
Assignment 4-1 (10 pts.) – Lab Practice 7
Lab 7-1 – Use the supplied and test classes to test your Clock and DateTwo classes respectively.
Lab 7-2 – Use the supplied test class to test the Month class you create.
Assignment 4-2 (15 pts.) – Lab Practice 8
Lab 8-1 – Create a class with a one-dimensional array of primitive types.
Lab 8-2 – Create and work with an ArrayList
Create 2 classes, NamesList and NamesListTest
Add a method to the NamesList class to populate the list and display its contents
Add a method to manipulate the values in the list
Lab 8-3 – Using Runtime Arguments – write a guessing game that accepts an argument and displays an associated message.
Create a class that:
Accepts a runtime argument,
Generates a random number,
Compares the random number to the argument value, and
Outputs a message to the user telling him/her if they correctly guessed the computer-generated number.
Assignment 4-3 (25 pts.)
Create a Java class called student with the following instance variables: private String studentName; private int [] grades; //an array of grades
Include setter and getter methods to set and get these 2 properties. The setter method for the grades instance array variable — setGrades() — should take a single argument which is an array of int with the grades already filled in. setGrades() should be used if statement(s) to make sure that each grade value in the array parameter is valid (between 0 and 100) — you will need to use a loop in conjunction with the if-statement(s) to do this efficiently. If a grade is out of bounds, setGrades() should set that grade value to 0. The array that you pass to setGrades() must hold between 3 and 5 grades.
Include a method called outputGrade() that averages