Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the output of the following programs public class InheritanceQ2 ( public static void main(String[] args) { CommunityMember commMem new CommunityMember (Fahd, 12345); Employee

image text in transcribed

image text in transcribed

What is the output of the following programs public class InheritanceQ2 ( public static void main(String[] args) { CommunityMember commMem new CommunityMember ("Fahd", 12345); Employee employee = new Employee ("Ahmed", 12346, 5000.75); Faculty faculty = new Faculty("Omar", 12347, 4000, 16); 1 1 class CommunityMember ( private String name; private int ID; public CommunityMember() System.out.println("Community Member"); } public CommunityMember (String name, int ID) ( this(); this.name = name; this.ID = ID; 1 1 class Employee extends CommunityMember 1 private float salary; public Employee () { System.out.println("Employee-Def"); ) public Employee (String name, int ID, float salary) this. salary salary; System.out.println("Employee"); 1 } class Faculty extends Employee ! private int numHours; public Faculty (String name, int ID, float salary, int numHours) { super(); this. numHours = numHours; }

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

design sprint solution sketch about used mobile shop buisness

Answered: 1 week ago

Question

1. Let a, b R, a Answered: 1 week ago

Answered: 1 week ago