1. Create a new Java class named Student that has the following fields o yearOfAdmission - The yearOfAdmission field is an calendar data type that holds the year of admitting the student (e.g. 2021) o Name - The name field is a String object that holds the name of the student (e.g. “Ahlam") o Address – The address field is a String that holds the address of the student (e.g. “AlHail”) 2. In addition to that, the student class should have the following methods. o Constructor - The constructor should accept yearOfAdmission, name, and Address as arguments ▪ These values should be used to initialize the year of admitting student, name of the student, and Address fields. o Getter Methods - Write three accessor (getter) methods to get the values stored in an object's fields ▪ getYear(), getName(), get Address () Below code is a hint to get you started. public class Student { private int yearOfRegistrn; private String Name; private String Address; // Constructor public student(int y, String A, String T) { year = y; // you figure out the next two lines } // Returns the student’s year of admitting in university public int getYear() { // you figure out the lines of code } // Returns the student Name public String getName() { // you figure out this one line } // Returns thetotal marks earned by the student public int get Address () { // you figure out this one line }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
1. Create a new Java class named Student that has the following fields o yearOfAdmission - The yearOfAdmission field is an calendar data type that holds the year of admitting the student (e.g. 2021) o Name - The name field is a String object that holds the name of the student (e.g. “Ahlam") o Address – The address field is a String that holds the address of the student (e.g. “AlHail”) 2. In addition to that, the student class should have the following methods. o Constructor - The constructor should accept yearOfAdmission, name, and Address as arguments ▪ These values should be used to initialize the year of admitting student, name of the student, and Address fields. o Getter Methods - Write three accessor (getter) methods to get the values stored in an object's fields ▪ getYear(), getName(), get Address () Below code is a hint to get you started. public class Student { private int yearOfRegistrn; private String Name; private String Address; // Constructor public student(int y, String A, String T) { year = y; // you figure out the next two lines } // Returns the student’s year of admitting in university public int getYear() { // you figure out the lines of code } // Returns the student Name public String getName() { // you figure out this one line } // Returns thetotal marks earned by the student public int get Address () { // you figure out this one line }
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education