Answer to Question #47733 in Java | JSP | JSF for john doe

Question #47733
looking for the solution to this program: // A Vacation is 10 days // but an ExtendedVacation is 30 days public class DebugVacation { public static void main(String args[]) { Vacation myVacation = new Vacation(); ExtendedVacation yourVacation = new ExtendedVacation; System.out.println("My vacation is for " + myVacation.getDays() + " days") System.out.println("Your vacation is for " + yourVacation.getDays() + " days"); } } //************************************************* //** ExtendedVacation class below this box ** //************************************************* class ExtendedVacation extends Vacation { public ExxtendedVacation() { days = 30; } } //************************************************ //** Vacation Class below this box ** //************************************************ class Vacation { protected int days; public vacation() { days = 10; } public int getDays() {
0
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS