Answer to Question #281993 in Java | JSP | JSF for Candy

Question #281993

2. Please construct a class in terms of the below description. (5 marks)

HKIT needs to develop a system to keep the students’ profile including the name, student id, the programme enrolled by the student, address of student and age. Student could read and modify his/her profile. Please help construct a Student class for this purpose.

class Student {

//variables (2 marks)

//getter (one getter is ok) (1 mark)

//setter (one setter is ok) (2 mark)


1
Expert's answer
2021-12-23T00:29:44-0500
public class Student {

    private String name;
    private Integer age;

    public String getName() {
        return name;
    }
    
    public void setAge(Integer age) {
        this.age = age;
    }

}

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