Question: public class Book { private String author; private String title; public Book(String bookAuthor, String bookTitle) { author = bookAuthor; title = bookTitle; ) Add the
public class Book \{ private String author; private String title; public Book(String bookAuthor, String bookTitle) \{ author = bookAuthor; title = bookTitle; ) Add the methods here... 5. Write a class Employee that define the following information: (Marks-3) a). Fields: name , emplD, age. b) Add three Constructor i) Constructor without Parameter ii) constructor with one parameter (name of Empoyee) iii) constructor with two parameters (name of Empoyee and empID) c) Write a method that print name, empID and age. d) Create two objects of Employee
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
