Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sample run public static void main ( String [ ] args ) { Student p 1 = new Student ( Jon , Jonsson,

Sample run
public static void main(String[] args){
Student p1= new Student("Jon", "Jonsson", 1995, "ACS", "1234567");
Instructor p2= new Instructor("Jon", "Jonsson", 1995,"MSc.","3D01");
System.out.println(p1.getName ());
System.out.println(p1);
System.out.println(p2.getName ());
}
System.out.println(p2);
Will print out
Jon Jonsson, 1234567
Jon Jonsson, 12345671995
J Jonsson, MSC.
J Jonsson, MSC.1995
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Public Finance

Authors: Harvey S. Rosen

5th Edition

025617329X, 978-0256173291

Students also viewed these Databases questions