Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

UML to Java code conversion. Could someone solve this Task *per the requirements* and break it down with an explanation so I could understand I

UML to Java code conversion.

Could someone solve this Task *per the requirements* and break it down with an explanation so I could understand I would really appreciate it . Please only answer if you can explain the solution well as I want to understand and apply it for the future. I have had an expert attempt to solve it but has not done it properly as well as not done the all bookings in a month();.so please check that all methods work and do multiple bookings as stated down below. Please follow the task properly and read the question below:image text in transcribed

Two of the classes found in our hotel booking system are the Booking class and the Booking Manager class. The Booking Manager class maintains a list (e.g. an ArrayList) of all bookings made, and has various utility methods for finding information out about the bookings on its list. The Booking class contains basic information about a hotel booking, with most of its methods being simple getters and setters. A UML class model of the two classes is depicted below. Booking - startDate : LocalDate - numberOfNights: int - costPerNight : double BookingManager - bookings : List + addBooking(booking: Booking): vold + getNumberOfBookings(): int + getTotalBookingValue(): double + clearBookings(): void + getAll Bookings(): List + getAll BookingsInMonth(month - String) : List 0.. + getStartDate(): LocalDate + setStartDate(date : LocalDate): void + getNumberOfNights(): int + setNumberOfNights(nights: int) : vold + getCostPerNight(): double + setCosterNight(cost : double): void + get TotalCost(): double Figure 1: UML Class Model of part of a Hotel Booking System Create the two classes depicted above. Some of the methods are a little tougher than others! You can read about the LocalDate class, which is in the java.time package, here. Pay particular attention to the Booking Manager's getAllBokingsInMonth() method, which is trickier than it first appears! You will need to also create a class with a main() method that creates a Booking Manager and some Bookings before testing each of the Booking Manager's methods to make sure you implemented them correctly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions