Answer to Question #271496 in Java | JSP | JSF for Stargirlsayo

Question #271496


Write a CGPA class that has a constructor for initializing four variables: name, matric number, level, and course of study, The program should have two other overloaded methods, one for collecting the credit unit of each course and the other for collecting points based on the grades of each student in each of the courses. Write a third method for calculating the CGPA of a number of students and return the names, matric numbers, levels, course of study, and their current CGPA, well-arranged (using format specifier if necessary). Execute the program using 5 records. Turn in the codes and a snapshot of the result on google classroom.


1
Expert's answer
2021-11-26T07:08:09-0500
import java.util.Scanner;
public class CGPA {
private  String name;
private int M_num;
private int level;
private String course;
static Scanner input = new Scanner(System.in);
   CGPA(int M,String C,String N,int L){
       name = N;
       M_num = M;
       level = L; 
       course = C;
   }
   void getRedit(){
       System.out.println("Enter credit\n");
       int cred = input.nextInt();
   }
   
   void getpoints(){
        System.out.println("Enter points\n");
       int points = input.nextInt();
   }
   
   String displayCGPA(){
       return name +" "+M_num+" "+level+"  "+course;
   }
    public static void main(String[] args) {
        
    }
    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS