|
SOLUTIONSLIBRARY.COM http://solutionslibrary.com/index.php/bmis-312-assignment-4/
BMIS 312 ASSIGNMENT 4 ________________________________________ Question 1 and 2 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. Question 3 Create a class with a one-dimensional array of primitive types. In this practice, you create an array containing the number of days that an employee at the Duke’s choice company receives, based on the number of years that the employee has worked for Duke’s choice. Question 4 Creating and populating an ArrayList Create a new java main class called NamesListTest. 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 Question 5 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. Question 6 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).
|
SOLUTIONSLIBRARY.COM http://solutionslibrary.com/index.php/bmis-312-assignment-4/
BMIS 312 ASSIGNMENT 4 ________________________________________ Question 1 and 2 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. Question 3 Create a class with a one-dimensional array of primitive types. In this practice, you create an array containing the number of days that an employee at the Duke’s choice company receives, based on the number of years that the employee has worked for Duke’s choice. Question 4 Creating and populating an ArrayList Create a new java main class called NamesListTest. 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 Question 5 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. Question 6 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).
|
|
SOLUTIONSLIBRARY.COM http://solutionslibrary.com/index.php/bmis-312-assignment-4/
BMIS 312 ASSIGNMENT 4 ________________________________________ Question 1 and 2 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. Question 3 Create a class with a one-dimensional array of primitive types. In this practice, you create an array containing the number of days that an employee at the Duke’s choice company receives, based on the number of years that the employee has worked for Duke’s choice. Question 4 Creating and populating an ArrayList Create a new java main class called NamesListTest. 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 Question 5 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. Question 6 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).
|
SOLUTIONSLIBRARY.COM http://solutionslibrary.com/index.php/bmis-312-assignment-4/
BMIS 312 ASSIGNMENT 4 ________________________________________ Question 1 and 2 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. Question 3 Create a class with a one-dimensional array of primitive types. In this practice, you create an array containing the number of days that an employee at the Duke’s choice company receives, based on the number of years that the employee has worked for Duke’s choice. Question 4 Creating and populating an ArrayList Create a new java main class called NamesListTest. 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 Question 5 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. Question 6 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).
|
|
SOLUTIONSLIBRARY.COM http://solutionslibrary.com/index.php/bmis-312-assignment-4/
BMIS 312 ASSIGNMENT 4 ________________________________________ Question 1 and 2 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. Question 3 Create a class with a one-dimensional array of primitive types. In this practice, you create an array containing the number of days that an employee at the Duke’s choice company receives, based on the number of years that the employee has worked for Duke’s choice. Question 4 Creating and populating an ArrayList Create a new java main class called NamesListTest. 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 Question 5 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. Question 6 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).
|
SOLUTIONSLIBRARY.COM http://solutionslibrary.com/index.php/bmis-312-assignment-4/
BMIS 312 ASSIGNMENT 4 ________________________________________ Question 1 and 2 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. Question 3 Create a class with a one-dimensional array of primitive types. In this practice, you create an array containing the number of days that an employee at the Duke’s choice company receives, based on the number of years that the employee has worked for Duke’s choice. Question 4 Creating and populating an ArrayList Create a new java main class called NamesListTest. 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 Question 5 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. Question 6 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).
|