Chaining of abstract classes
Title
Question
Sir, my first question was that how can we chain a class object, say Student 33 or Employee33 with that of abstract class as shown in Demo33. I have done a similar thing which is nearabout same which you answered as a chain of Class marks in the forum section today.
Q2) In Demo33.java file we used the object of abstract class say Person33 and used the constructor of a subclass say Employee33 to send the user details (here it's bydefault written as say,. Begum Akhthar or Hariprasad Chaurasia etc.) now that thing I wanted to implement in my program while using chain of objects for multiple employees. I am not saying my program is correct and other things are wrong but I want to learn this concept very well so that in future I should not face difficulty with the knowledge. I know the code is long but you are the professor, hope you can solve this easily.
https://drive.google.com/file/d/1xx75knH7Vjp6vFqMO3kkgfORaobvKtpv/view?usp=drivesdk
https://drive.google.com/file/d/1xxNGhWjvL-h1Hwmistkj6aTmTL4XUCJy/view?usp=drivesdk
Java Abstract-Classes 10-11 min 50-60 sec
Answers:
Demo33. java is working fine. If you need to create multiple objects of class, then array can be used to store the object reference.
Sow.java: abstract and static modifiers have been used for the salary() method. Static methods can not be declared as abstract. Use appropriate modifiers for methods.
Login to add comment