bmis 312 job

profileprince Johnson
assignment_3_instructions1.docx

BMIS 312

Assignment 3 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 3-1 (10 pts.) – Lab Practice 5

Complete Lab Practice 5-1 and 5-2 and test your solutions using the following provided test programs:

· CustomerTest.java for 5-1

· OrderTest.java, PersonTest.java, and TemperatureTest.java for 5-2

Assignment 3-2 (10 pts.) – Lab Practice 6

Assignment 3-3 (30 pts.)

Create a class called Employee that has the following attributes:

· Employee ID of type String

· First name of type String

· Last name of type String

· Job Position of type String

· Fulltime of type Boolean

· AnnualSalary of type double

· WeeklySalary of type float

For each of the attributes above create setter and getter methods. The WeeklySalary should be calculated by dividing AnnualSalary by 52.

Create a separate test class (EmployeeTest) with the main method and within the test class that instantiates 2 completely separate employees and demonstrates that the setter and getter methods are working.

Finally, either overload the toString method of Employee or create a separate Employee display method to print out your employee information.

Submit this assignment by 11:59 p.m. (ET) on Monday of Module/Week 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 ClockTest.java and DateTwoTest.java test classes to test your Clock and DateTwo classes respectively.

· Lab 7-2 – Use the supplied MonthTest.java 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 up all the grades in the student grades array and then uses a switch statement to output grade conversions based on the following criteria:

· For values from 0–59, your program should output: “Student has failed this class”

· For values from 60–69, your program should output: “Student gets a D”

· For values from 70–79, your program should output: “Student gets a C”

· For values from 80–89, your program should output: “Student gets a B”

· For values from 90–100, your program should output: “Student gets an A”

Where “Student” is the actual name of the student.

Create a test class called TestStudent that instantiates 3 students and sets their names and grades and then calls outputGrade() for each student. For your 3 students, 1 must have 3 grades, 1 must have 4 grades, and 1 must have 5 grades. This is so you will have 3 different array sizes to pass to setGrades(). Make sure that for 1 student, setGrades() is called with 1 grade value that is out of bounds (less than 0 or greater than 100).

Submit this assignment by 11:59 p.m. (ET) on Monday of Module/Week 4.