Answer to Question #271093 in Java | JSP | JSF for Ayomide Adebiyi

Question #271093

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-25T00:53:55-0500


package cgpa;


import java.util.Scanner;




public class CGPA {
    static Scanner scan = new Scanner(System.in);
private  String name;
private int matric_number, level;
private String course_of_study;
   CGPA(String n, int m, int l, String c){
       name = n;
       matric_number = m;
       level = l; 
       course_of_study = c;
   }
   void collecting_redit(){
       System.out.println("Enter credit\n");
       int credit = scan.nextInt();
   }
   
   void collecting_points(){
        System.out.println("Enter points\n");
       int point = scan.nextInt();
   }
   
   String calculating_CGPA(){
       return name +" "+matric_number+" "+level+"  "+course_of_study;
   }
    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