Question: Java code. How to successfully run the following code without modifying the content of the following code, i have person,student class. They are very similar

Java code. How to successfully run the following code without modifying the content of the following code, i have person,student class. They are very similar , but have different parameters, such as the school class and the student number.The red line reports that the person class cannot be converted to a student class.

Java code. How to successfully run the following code without modifying the

Person bob-new Person (11315, "Bob) int bobAcc1d = b. openAccount (bob, 1000) ; Persan aliceneStudent 12512AliceNCan1234 int aliceAcctId - b. openAccount (alice, 500) Person rich = new Person (51542, "Rich P. Person); int richAcctId-b. openAccount (rich, 1000000) Person richStudent = new Student (23814 Rich P. Student int richStudentAcctId - b. openAccount (richStudent, 100100)

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!