How to do references in Java work?

How does a Super class work in Java?

  • I need help on a Super class program on Java.? Write an abstract super class encapsulating a vacation: A vacation has two attributes: a budget and a destination. It has an abstract method returning how much the vacation is over or under budget. This class has two non-abstract subclasses: one encapsulating an all-inclusive vacation, and the other encapsulating a vacation bought piece-meal. An all-inclusive vacation has three additional attributes: a brand (for instance ClubMed); a rating, expressed as a number of stars; and a price. A piecemeal vacation has two additional attributes: a set of items (hotel, meal, airfare), and a set of corresponding costs. You also need to include a client class to test these two classes using either an ArrayList or an array of objects to populate the array, print the state of each element and the total costs for all vacations. Also include and test an abstract calculate cost method that returns the total cost of each vacation I am using Java Unlimited Version 3 import java.util.Scanner; import java.text.NumberFormat; import java.util.ArrayList; public class Vacation { public static void main (String [] args) private int budget; private String destination; } class PiecemealVacation extends Vacation { }

  • Answer:

    What exactly do you need help with? You have most of your answer there.

KnightHu... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.