translateMon, 27 Mar 2023

let's build a class SinhVien with the attributes of students created by them come up with (must list at least 3 properties), in addition the class has 4 more properties about The scores are: theory score, practical score, midterm (exam) score and final (exam) score. Besides, when any student object has just been created, the initial value of the score columns are equal to 0. Then write a program that uses the above student class and has the functions data entry for students (enter values for attributes); calculate the average score of students members (20% theory + 20% practice + 20% midterm + 40% final) and information export of students on the screen. In addition, the program must have getter and setter methods to get and set the value for all object member properties in java

public class SinhVien { private String name; private int age; private String address; private String gender; private String phone; private String studentID; private String status; private float theory; private float practice; private float midterm; private float final; public SinhVien() { theory = practice = midterm = final = 0; } public SinhVien(String name, int age, String address, String gender, String phone, String studentID, String status) { this.name = name; this.age = age; this.address = address; this.gender = gender; this.phone = phone; this.studentID = studentID; this.status = status; this.theory = 0; this.practice = 0; this.midterm = 0; this.final = 0; } public SinhVien(String name, int age, String address, String gender, String phone, String student

Questions about programming?Chat with your personal AI assistant