Explain the following question detail how to solve using java programming with detailed code and output screenshot Create a class called vacation with Data members (1) Place (2) Date (3) Activities [array of elements], (4) Cost of each activity [array of elements] Methods (1) GetMethod (2) PrintMethod Inherit the data members and methods to a new class called “SummerVacation” and include the data members (1) CourseTitle (2) OnlinePlatform [eg: nptel, courseera, udemey..] (3) Duration Methods (1) GetMethod (2) PrintMethod (3) Calculate the total cost spent in vacation by creating static method (a)Define atleast two objects in main method and invoke the methods defined in the class definition. (b)Consider the code developed for above Question(a), but Vacation class in Package 1, SummerVacation in SubPackage1, Object creation and method invoking in Package 2.
Explain the following question detail how to solve using java
Create a class called vacation with
Data members
(1) Place
(2) Date
(3) Activities [array of elements],
(4) Cost of each activity [array of elements]
Methods
(1) GetMethod
(2) PrintMethod
Inherit the data members and methods to a new class called “SummerVacation” and include the data members
(1) CourseTitle
(2) OnlinePlatform [eg: nptel, courseera, udemey..]
(3) Duration
Methods
(1) GetMethod
(2) PrintMethod
(3) Calculate the total cost spent in vacation by creating static method
(a)Define atleast two objects in main method and invoke the methods defined in the class definition.
(b)Consider the code developed for above Question(a), but Vacation class in Package 1, SummerVacation in SubPackage1, Object creation and method invoking in Package 2.
Step by step
Solved in 8 steps with 6 images