Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please provide the java code. Please don't post the code as pictures. 1 Hall Equality Now we know how to use the equals() method. Now

image text in transcribedimage text in transcribedimage text in transcribed

Please provide the java code. Please don't post the code as pictures.

1 Hall Equality Now we know how to use the equals() method. Now let's use it in our application to reduce redundancy. Same halls cannot be booked on the same date for two different events. So get the halls booked by two different persons and check whether it is same or not. Use equals method to check all attributes of the hall are equal including booking date. Create Hall class with following private attributes Attributes Datatype name String contact Number String costPerDay Double ownerName String Include appropriate getters and setters Create Default and Parameterized Constructor as Hall(String name, String contact Number, Double costPer Day, String ownerName) for the class. Override equals method that compares all the fields of the class. Create a driver class named Main to test the above class. Input Format Input consist of two sets of hall booking details Refer sample input Output Format Output prints whether the booked halls are same or not Sample Testcases Testcase 1 Input Testcase 1 Output Halls are different Benny 9089078654 1000 Dayal Samir 9789432346 2000 Dev Testcase 2 Input Testcase 2 Output Halls are same Benny 9089078654 1000 Dayal Benny 9089978654 1000 Dayal

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

Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463

Authors: Josep Domingo-Ferrer ,Maryline Laurent

1st Edition

3031139445, 978-3031139444

More Books

Students also viewed these Databases questions