Question: Make a java program thatdo the following: Make a super class named employee which has three attributes name, age and salary and a method named
Make a java program thatdo the following:
- Make a super class named employee which has three attributes name, age and salary and a method named printData that prints name, age and salary of an employee.
- Provide two classes named programmer and database specialist (DatabasePro).
- Each one of these classes extends the class employee.Both classes; programmer and the DatabasePro inherit the fields name, age and salary from employee.For the programmer, we add a language attribute and for the specialist (DatabasePro), we add a database tool attribute.
- Each one of these classes has only the method printData(). This method prints the data of the employee (i.e., name, age and salary by invoking printData() in super class) as well as printing the special data for programmer( i.e., language) and for DatabasePro( i.e.,databaseTool).
- Provide a class Main that Makes programmer and database specialist then initialize and print their respective information.
Typical runs of the program

name: Ben age: 37 salary: 77435.0 language: Java name: Jack age: 28 salary: 45000.0 Database Tool: My SQL ---jGRASP: operation complete.
Step by Step Solution
3.28 Rating (148 Votes )
There are 3 Steps involved in it
class employee public String name public int age public double salary public void printDataString na... View full answer
Get step-by-step solutions from verified subject matter experts
