Write a Student class that stores information for a Montclair student. The class should include the following instance variables
Write the following methods for your Student class:
Create a sub class call Graduate_Student, which inherit from the Student class.
All instances variables should be the same except that the status variable be updated to 5.
Write the following methods for your sub class:
public class Student
{
int id;
String lastName;
int creditsEarned;
int courseLoadCredits;
int status;
public Student(int idd, String name)
{
id=idd;
lastName=name;
}
public void registerCourse(int courseLoad)
{
if(courseLoad>0 &&
(courseLoadCredits+courseLoad<19))
{
courseLoadCredits+=courseLoad;
}
else
{
System.out.print("courseLoadCredits cannot be greaterthan
18")
}
}
public void withdraw(int courseLoad)
{
if(courseLoadCredits-courseLoad>0)
{
courseLoadCredits-=courseLoad;
}
}
public void passedCourse(int val)
{
courseLoadCredits-=val;
creditsEarned+=val;
}
public String createEmail()
{
String email;
email=lastName+Integer.toString(id)+"@Montclair.edu";
return email;
}
}
public class Graduate_Student extends Student
{
public void registerCourse(int credit)
{
if(credit>0 &&
courseLoadCredits+credit<16)
{
courseLoadCredits+=credit;
}
else
{
System.out.print("Credit cannot be greaterthan
15")
}
}
}
Write a Student class that stores information for a Montclair student. The class should include the...
please help me with this python code thank you 1. Write a Student class that stores information for a Rutgers student. The class should include the following instance variables: (10 points) o id, an integer identifier for the student o lastName, a string for the student's last name o credits, an integer representing the number of course-credits the student has earned o courseLoad, an integer representing the current number of credits in progress Write the following methods for your Student...
PART I: Create an abstract Java class named “Student” in a package named “STUDENTS”. This class has 4 attributes: (1) student ID: protected, an integer of 10 digits (2) student name: protected (3) student group code: protected, an integer (1 for undergraduates, 2 for graduate students) (4) student major: protected (e.g.: Business, Computer Sciences, Engineering) Class Student declaration provides a default constructor, get-methods and set-methods for the attributes, a public abstract method (displayStudentData()). PART II: Create a Java class named...
Last picture is the tester program! In this Assignment, you will create a Student class and a Faculty class, and assign them as subclasses of the superclass UHPerson. The details of these classes are in the UML diagram below: UHPerson - name : String - id : int + setName(String) : void + getName(): String + setID(int) : void + getID(): int + toString(): String Faculty Student - facultyList : ArrayList<Faculty - rank: String -office Hours : String - studentList...
please help Write a simple program with Student class having STL list of Record's structure as a member. 1. Records of the Students are not accessible to the outside world. 2. Student shall output its standing (Freshman, Sophomore etc). 3. A Student can only be created with the name 4. A class can only be added if there is a class name and the passing grade. Driver program creates a Student, adds few classes to the Student's records, then prints...
Implement an abstract class named Person and two subclasses named Student and Staff in Java. A person has a name, address, phone number and e-mail address. A student has a credit hour status (freshman, sophomore, junior, or senior). Define the possible status values using an enum. Staff has an office, salaray, and date-hired. Implement the above classes in Java. Provide Constructors for classes to initialize private variables. Getters and setters should only be provided if needed. Override the toString() method...
Java Programming Design a class named Person and its two subclasses named Student and Employee. A person has a name, address, phone number, and email address. A student has a class status (freshman, sophomore, junior, or senior). Define the status as a constant. An employee has an office, salary, date hired. Define a class named MyDate that contains the fields year, month, and day. Override the toString method in each class to display the class name and the person's name....
a c++ program (The Person, Student, Employee, Faculty, and Staff classes) Design a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A person has a name, address, phone number, and email address. A student has a class status (freshman, sophomore, junior, or senior). Define the status as a constant. An employee has an office, salary, and date hired. Use the MyDate classto create an object for date hired. A faculty...
In Java(The Person, Student, Employee, Faculty, and Staff classes)Design a class named Person and its two derived classes named Student and Employee. MakeFaculty and Staff derived classes of Employee. A person has a name, address, phone number, and e-mail address. A student has a class status (freshman, sophomore, junior, or senior). An employee has an office, salary, and date hired. Define a class namedMyDate that contains the fields year, month, and day. A faculty member has office hours and a rank....
This Question: 1 pt 15 A frequency distribution for the class level of students in an introductory statistics course is shown. Two students are randomly selected without replacement. Complete parts (a) Class Frequency Freshman Sophomore16 through (d). Junior Senior a. Determine the probability that the first student obtained is a junior and the second a senior. The probability that the first student obtained is a junior and the second a senior is Type an integer or a decimal rounded to...
Consider the following partial UML class diagram for the class Student:Student-studentID: String-name: String-school: String+validateStudentID (s: Student):boolean studentID is a string that consists of a letter representing the school followed by 5 digits. The codes used for the schools in this scenario are shown below:SchoolCodeExample of student IDFASC'A'"A12345" refers to a student from FASC.FAFB'B'"B88888" refers to a student from FAFB.Write the code for the method validateStudentID (Student student) such that it performs validations on the parameter's student ID to ensure that:- the...