What's new

Closed Help me for codes

Status
Not open for further replies.

Jannelle345

Honorary Poster
Joined
Sep 9, 2018
Posts
250
Reaction
83
Points
160
Sino dito marunung kasi di na discuss samin to


public class Student {

// Write a static initializer to initialize the static field/class variable scchoolName to "USTP", the default value.

// Write the 1st constructor with 4 formal parameters to initialize the instance fields/instance variables
id, name, course, yearL. Use this to create the student record without exam.
// write the 2nd constructor with 6 formal parameters to initialize the instance fields/instance variables
id, name, course, yearL, score, total. Use this to create the student record with exam.

static String schoolName;
String id,name,course;
int yearL;
double score,total,grade;

// Write a method computeGrade() to compute and return the student's exam grade using the standard 50% passing formula,
// grade=5-4*(score/total)

}

===================================================================================

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ClassRecord {

public static void main(String[] args)throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader( System.in));
// Declare an array of 5 instances of class type Student.
// Provide 5 task options for the user as described below:
// 1 - to input student record's data without exam and create this student record by instantiation
// passing the data via the constructor
// 2 - to input student record's data with exam and create this student record by instantiation
// passing the data via the constructor
// 3 - to display 1 student record, ask the user to input the id and display the record whose id is the input
// 4 - to display all student records
// 5 - to exit the program
// Allow the user to do several task options until the user choose to exit the program

}

}
 

Attachments

Status
Not open for further replies.

Similar threads

Back
Top