Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve asap( java program)(I only have 45 mins left) (from A-E, answer true of false) (the last 2 questions answer regularly, meaning that you

please solve asap( java program)(I only have 45 mins left)
(from A-E, answer true of false)
(the last 2 questions answer regularly, meaning that you have to analyze the diagram in order to slove it.)
image text in transcribed
image text in transcribed
Class Diagrams Person String name: private int age; +Person(String n, int a) Person +Retare +static void sayHit SOP "Hi from Person"); 1 Benefit Faculty private double salary; + double getSalary: Student double pa private String id; +Student(String n, int a double s Stringi) Student Students + Student +Betpal + int getBenefits) { return 20;1 Benefit VisitingFaculty Exchange +int getBenefits/{ return 100;} Senior String capstone; RetCapstone) + static void sayi SOP("Hi from Senior": + int getBenefits() {retum super.getBenefits)+30) Benefits Interface has one method: int getBenefits(); A-F => 1 mark each A) The Student class must have an import statement. B) If I make an object of type Exchange, then a constructor in Benefits will be called. C)The Visiting Faculty class has a compiler error (analyze what the constructor/super does) E) The Senior class has a compiler error (analyze what the constructor/super does) F) How many instance variables does the Exchange class have, and which ones can it access directly. G) Write only the first and second constructors for the Student class (not the 34 one) (2 marks each)

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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions