Hello guys! I need advice. So I'm working on a Reservation feature of a system. I have created a DAO's for Customer, Employee, and CustomerInquiries. I will explain to you how this works first. The customer creates a "customer inquiry" on the company website to inquire about rental of buses. The employee, then, could log into the website and view the customer's inquiry, and confirm it with the customer. It is better to remove the CustomerInquiriesDAO and just add the methods under Customer? I was also thinking that customer inquiries could just be stored under reservations table and the employee could just confirm it from that module.

1 Year
Discussion Span
Last Post by JamesCherrill

It's impossible to give a definitive answer without complete info, but at first sight my gut feel is:
Customer and CustomerEnquiry are clearly different things, witha clear "has-a" relationship. There's no doubt that you would model these as different classes. Maybe there would be technical reasons to combine them at the programming starge, but I suspect not.
For maintenance and future enhancements you are usually better off with more and smaller classes, each encapsulating its own well-defined functionality, than with fewer mega classes that do many different things across hundreds of sphagetti methods.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.