Travel company and are upgrading the programs

Assignment Help Chemistry
Reference no: EM131022260

A C# console program showing composition among classes

Abstract:
You work in a travel company and are upgrading the programs they use to make reservations. Reservations are made by customers for hotel rooms at different destinations. The reservations also include the airline ticket information. However, this information is stored in several different tables in the database. Your project manager informs you that you have to model the classes in your program based on the tables in the database....but that saving the information and reading them will be done later.
.......You ask one of the other programmers how to do this and your coworker says "What you need to do is to have the Flight and Room as separate classes and then make a Reservation class that has one of each of them as internal objects. The system is going to be passing all of them together to different places too and it would be better to do it as a composite object because that's the way we think about it in our company."

Instructions:
 Create a class called Flight with a FlightID (String) and price (decimal). Include a constructor that takes both values, and  get() and set() properties for both data attributes.

 Create a class called Room with a RoomID (String), HotelName(String), DaysReserved(String to keep it simple here) and price (decimal). Include a constructor that takes all four values, and get() and set() properties for all four data attributes.

 Create a class called Reservation that has a Flight Object, Room Object and a CustomerID(String). Include a constructor, get() and set() property for the CustomerID(). You may include get() and set() methods for the Flight and Room objects to work with them like will be shown in a class example during the lecture -or- create the objects first and pass them in through the constructor like the Employee class does with its 2 Dates in chapter 10. (Either way is fine and it is completely up to you.) ...Also create a toString() method in the Reservation that reports the reservation price of the flight and the room that are inside it added together, as well as all of the other information including the CustomerID, FlightID, RoomID, HotelName, and DaysReserved.

Note on common errors on similar assignments in past classes:
Do not have a decimal variable to store a price in the Reservation.
Do not have a FlightID, RoomID, HotelName, or DaysReserved in Reservation.
(This data is all stored in the internal objects. Having them in the outer class and not using these values stored in the inner classes will be a major deduction because this assignment is on composition.)

Create a class called ReservationTest that creates 2 Reservations with all of their values, then prints out all of the information for that reservation to the screen for the user.

To make this simpler, you do not have to get the data from the user to put inside of these reservations. You can hard code the values like is done on the dates and employees.

Reference no: EM131022260

Questions Cloud

Relational database : Prepare a Proposal Outline on "Relational Database" and provide a narrative analysis of the customer and user needs by defining the customers and users as well as describing their individual needs. Information to consider includes:
Which of the following cisco ios firewall router commands : Which of the following Cisco IOS firewall router commands correctly configures authentication and encryption for an IPSec transform set?
Use the verbs add : At the State University, tuition is $350 per credit hour.   Health insurance is 10% of total tuition fee;  Fees are $125.Assume NUM-CREDITS-IN is part of an input record for a given student.  Write the COBOL code to calculate WS-TUITION-FEE, WS-HEALT..
Explain a situation in which you engaged in impression : Provide examples of people from your life who you believe engage in impression management, and discuss why you believe this person acts this way.
Travel company and are upgrading the programs : You work in a travel company and are upgrading the programs they use to make reservations. Reservations are made by customers for hotel rooms at different destinations. The reservations also include the airline ticket information. However, this infor..
How much is the voltage across the switch : With the switch, S1, closed in Fig, How much is the voltage across the switch? How much is the voltage across the lamp?
Evaluate contemporary applications of psychology : For more in-depth assistance with your annotated bibliography, please visit the Ashford Writing Center located under the Learning Resources tab in the left-hand navigation panel of your online course.
What is the opportunity cost if tina travels by bus : Tina can travel from Madison to Chicago in one hour by taking an airplane. The same trip takes  4 hours by bus. Airfare is $80 and the bus fare is $30. If she is not travelling, Tina can work to earn $25/hour. Answer the following questions: What ..
What will happen to a banks balance sheet : What will happen to a banks balance sheet if you open a $100 checkable deposit account in the bank - What is the discount rate? What is the federal funds rate?

Reviews

Write a Review

Chemistry Questions & Answers

  Analysis of a compound containing only c and cl revealed

analysis of a compound containing only c and cl revealed that it contains 33.33 c atoms by number and has a molar mass

  Explain what is the percent by mass of aluminum chloride

What is the percent by mass of aluminum chloride (AlCl3) prepared by dissolving 26.8g in 355.0ml of water? assume density of water is 1.00g/ml

  Explain electron transfer proceed more rapidly

They help position the reactant molecules to facilitate the reaction. They make electron transfer proceed more rapidly.

  Evaluate the ph of a solution that results from mixing

Calculate the pH of a solution that results from mixing 32.8 mL of 0.157 M dimethylamine ((CH3)2NH) with 44.0 mL of 0.144 M (CH3)2NH2Cl. The Kb value for (CH3)2NH is 5.4 x 10-4

  Explain one mole of water h2o and one mole of ethanol c2h5oh

Consider two samples of liquid: one mole of water H2O and one mole of ethanol C2H5OH. The density of water is 1.0 g/mL, and the density of ethanol is 0.785 g/mL. Answer each of the following questions by selecting the correct choice.

  Determine the fraction of n2 molecules traveling

Determine the fraction of N2 molecules traveling between 500 and 600 m/sec at room temperature

  Evaluate the grams of nicl2 of the solution

A 15.0% (w/w) NiCl2 (129.61 g/mol) solution has a density of 1.149 g/mL. Calculate the grams of NiCl2 contained in each liter of this solution

  Evaluate the energy transferred as heat to evaporate

Calculate the energy that must be transferred as heat to evaporate 1.00 kg of water at (a) 25 degrees celsius and (b) 100 degrees celsius

  How the structure of the atom were validated

Based on the data gathered in the Rutherford's scattering experiments, the concept of atomic structure was modified. Which of the following aspects of the structure of the atom were validated by these experiments

  Find out the term symbols electronic configuration

Determine the term symbols for a 4s13d1 electronic configuration. Which is the ground state term

  Explain a thin plate of copper is suspended in seawater

A thin plate of copper is suspended in seawater. If the corrosion rate is 0.4 mpy (mils per year) and the plate is a square of dimension 4.0 in. per side, how much weight loss (in mg) is expected in 18 days

  What are the main electron carriers within the complexes

Briefly describe the pathway of the protons and electrons of two hydrogen atoms that come from NADH/H+ and pass through the electron transport chain apparatus (including complexes I - V). What are the major electron carriers within these complexes

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd