Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Time left 0:37: name = public class Student{ private final String name; public Student() { Engineer; } public Student( String newName ) { name =
Time left 0:37: name = public class Student{ private final String name; public Student() { "Engineer"; } public Student( String newName ) { name = newName; } public String getName() { return name; } } The Student class is given for you. Implement a class named as JavaLevel. It should satisfy the following properties: 1. (2 pts.) Create two private fields named as javaStudent (of type Student) and level (of type int). 2. Create two constructors: o (2 pts.) A no-arg constructor that gives initial values to javaStudent (by using the no-arg constructor of Student class) and level (=0). o (3 pts.) A constructor that takes a Student and an integer for javaStudent and level data fields respectively. Use them for initializing java Student and level data fields. 3. (5 pts.) Implement accessor and mutator methods for javaStudent 4. (3 pts.) Implement only an accessor for level 5. (5 pts.) Create a method increaseLevel() which simply increases (+1) the level of the student 6. (5 pts.) Finally, write a method called to String that returns a string of the form: "
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started