Question: Student.java 1 package student; 2 3 public class Student { /* Create any necessary variables here */ 5 6 7 9 10 11 12 13

 Student.java 1 package student; 2 3 public class Student { /*
Create any necessary variables here */ 5 6 7 9 10 11
12 13 14 * Initialises the class information including student name, postcode,
* address and gpa. * @param name The student's name. * @param
address the student's current residential address. * @param postcode The student's current

Student.java 1 package student; 2 3 public class Student { /* Create any necessary variables here */ 5 6 7 9 10 11 12 13 14 * Initialises the class information including student name, postcode, * address and gpa. * @param name The student's name. * @param address the student's current residential address. * @param postcode The student's current residential postcode. * @param gpa The student's current gpa. public Student (String name, String address, int postCode, double gpa) { 15 16 } 18 19 20 21 22 * Returns the student's name. @return Student's name. public String getName() { 23 24 25 26 27 29 Returns the student's address. * @return Student's address. public String getAddress() { } 30 31 32 33 34 35 36 37 38 39 40 41 42 43 Returns the student's postcode. Greturn Student's postcode. public int cet Post Code () 3 Returns the student's opa. Greturn Student's apa. public double getGPA() { } * Change the student's name. * Gparam name Student's new name. public void setName (String name) { 3 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 * Change the student's address. @param address Student's new address. */ public void setAddress (String address) { } * Change the student's postcode. * @param postcode Student's new postcode. public void set PostCode (int postCode) { } /** * Change the student's gpa. @param gpa Student's new gpa. public void setGPA (double opa) { 72 73 74 75 76 ) 77 } Implement a Class with information hiding and access control You are required to implement a simple class to represent a student. The class can store information including name, address, postcode and gpa. The student must be implemented in a class called student. Create class variables as needed to store this information. Ensure that created class variables have the appropriate access control. Complete the provided accessor ("getter") and mutator ("setter") methods for each class variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!