Starting from:

$30

CSE1322-Assignment 2 Solved

Write an abstract class called Vacation includes a budget and a destination.  It has an abstract method returning by how much the vacation is over or under budget.  This class has two non-abstract subclasses: 

 

All-Inclusive Vacation 

brand (such as ClubMed, Delta Vacations, etc)

a rating (you can use # of stars)

price 

 

Piecemeal Vacation 

set of items (hotel, meal, airfare, etc)

set of corresponding costs (hotel cost, meal cost, airfare cost, etc.)

 

 

You need to write a test class to test all these classes and methods in each.  You will need to start by writing the pseudocode for your programs, then code the solution and test your solution. 

 

 

Break the problem down and write the pseudocode: 

Break the problem statement into parts to fully understand what is expected as input, output and processes in your code.  Write down all the variables you will need from the problem statement.  Once you have broken down the problem, start writing your pseudocode.  

 

Writing the pseudocode may take a while and several iterations to fully get the solution complete.  Walk through the problem and your pseudocode as if the program is running and you are the user.  Make sure your input prompts and output messages are clear.

Now make sure that your code is the best it can be.  Check your formatting, prompts to the user, and make sure they are clear and

help the user interact with your code in an easy manner.

 

 

 

Write an abstract class called Vacation includes a budget and a destination.  It has an abstract method returning by how much the vacation is over or under budget.  This class has two non-abstract subclasses: 

 

All-Inclusive Vacation 

brand (such as ClubMed, Delta Vacations, etc)

a rating (you can use # of stars)

price 

 

Piecemeal Vacation 

set of items (hotel, meal, airfare, etc)

set of corresponding costs (hotel cost, meal cost, airfare cost, etc.)

 

 

Review your pseudocode: 

Make any changes you need to based on the feedback you received from grading.

 

 

Start writing the code from your pseudocode:

Code the solution from your pseudocode beginning with part (a).  Remember that part (a) will be used in part (b), so make sure you write the code in a way that it can be used in part (b).  Code part (b). Compile and debug all parts of your program to ensure it is correct.  

 

Now make sure that your code is the best it can be.  Check formatting, prompts to the user, and make sure they are clear and help the user interact with your code in an easy manner.

 

Test:

 

Test your code with at least two sets of input (one of which should be the inputs included as part of this problem statement.)

 

Now make sure that your code is the best it can be.  Check your formatting, prompts to the user, and make sure they are clear and help the user interact with your code in an easy manner.

More products