// Please find the required solution import java.util.Scanner; //Course grade class public class CourseGrades { // declare fields int student_id; int grade; // getters and setters for fields public int getStudent_id() { return student_id; } public void setStudent_id( int student_id ) { this.student_id = student_id; } public int getGrade() { return grade; } public void setGrade( int grade ) { this.grade = grade; } // read compute average public static float computeAverageGrade( CourseGrades[] courseGrades ) { int sumOfGrades = 0; for( CourseGrades courseGrade : courseGrades ) sumOfGrades += courseGrade.getGrade(); return sumOfGrades / courseGrades.length; } // read input from user public static CourseGrades[] readCourseGrade() { System.out.println("Input for 5 students"); Scanner input = new Scanner(System.in); CourseGrades[] courseGrades = new CourseGrades[5]; for( int i = 0; i < 5; i++ ) { courseGrades[i] = new CourseGrades(); System.out.print("Input the student Id:"); courseGrades[i].setStudent_id(input.nextInt()); System.out.print("Input the student Grade:"); courseGrades[i].setGrade(input.nextInt()); } input.close(); return courseGrades; } public static void main( String[] args ) { // reads 5 student id's and grades CourseGrades[] courseGrades = readCourseGrade(); // print the computed average System.out.println("Average of grades:" + computeAverageGrade(courseGrades)); } } Sample output screenshot:

Java netbeans, points out of 10 Exercise#3 Create a class CourseGrades that consists of two data...
Java - In NetBeans IDE: • Create a class called Student which stores: - the name of the student - the grade of the student • Write a main method that asks the user for the name of the input file and the name of the output file. Main should open the input file for reading . It should read in the first and last name of each student into the Student’s name field. It should read the grade into...
Hey, need some help in Java. I'm stuck on one step that prevents me from doing the rest of the steps and need help on it. I also have a problem when I print databaseCourse and programmingCourse. instead of saying 5 and 7 respectively is shows 51 and 71. Step 8: in CourseGrades, create a method, add, that takes two parameters, studentNum and grade, and changes the grade of student studetNum to the given grade, grade. studentNum represents the student...
In Java 8 Write a HomeworkGrades class that stores the homework grades for 8 chapters into an array of doubles. • Write a constructor that takes an array as input and copies the contents of the array into the class’ array. • Write methods to calculate: • The average of the homework grades • The lowest grade • Write a main function that creates an array with this data: • double[ ] grades = {98.7, 77.9, 90, 83, 67, 33,...
IN JAVA WITH COMMENTS, The assignment: This program inputs the names of 5 students and the (integer) grades they earned in 3 tests. It then outputs the average grade for each student. It also outputs the highest grade a student earned in each test, and the average of all grades in each test. Your output should look like this: Mary's average grade was 78.8% Harry's average grade was 67.7% etc... : In test 1 the highest grade was 93% and...
Java Program 1. Write a class that reads in a group of test scores (positive integers from 1 to 100) from the keyboard. The main method of the class calls a few other methods to calculate the average of all the scores as well as the highest and lowest score. The number of scores is undetermined but there will be no more than 50. A negative value is used to end the input loop. import java.util.Scanner; public class GradeStat {...
JAVA LANG PACKAGE Create a NetBeans project for this activity. 1: Create a new class with attributes name and address. Both data type will be String. Create a constructor and assign the parameters to the attributes. Now override the to String() method. 2: Create a class with the main method and create an instance of the class that you created 3: Create an instance of the string in your test class and assign a value. 4: Now create an String...
Create a new NetBeans project called PS1Gradebook. Your program will simulate the design of a student gradebook using a two-dimensional array. It should allow the user to enter the number of students and the number of assignments they wish to enter grades for. This input should be used in defining the two-dimensional array for your program. For example, if I say I want to enter grades for 4 students and 5 assignments, your program should define a 4 X 5...
In this assignment you will create two Java programs: The first program will be a class that holds information (variables) about an object of your choice and provides the relevant behavior (methods) The second program will be the main program which will instantiate several objects using the class above, and will test all the functions (methods) of the class above. You cannot use any of the home assignments as your submitted assignment. Your programs must meet the following qualitative and...
Create a class called Student. This class will hold the first name, last name, and test grades for a student. Use separate files to create the class (.h and .cpp) Private Variables Two strings for the first and last name A float pointer to hold the starting address for an array of grades An integer for the number of grades Constructor This is to be a default constructor It takes as input the first and last name, and the number...
create a class in Java for a Plane the class will include String Data Fields for the make, model, and year. (as well as mutators and accessors) Defined constructor and copy constructor. there must be a toString method as well as a copy method. runner program the program will create an array for Plane class. The size of the array will be set to user input. then the user will input the information into each plane object in the array....