-
Class diagram help!
Hi I am really struggling creating a class diagram for a hotel reservation system! I have the main classes I am going to use and the attributes within them but a, having severe trouble working out all the operations I need to use! Would appreciate any help!
I need help with my booking class that will include startdate, duration, room:Room and refnumber.
And my Room class which will include description, room type, and price. I have the basic getters and setters but am unsure what other operations I need!
I also have my main control class and a user interface class
-
Re: Class diagram help!
Hi!
This isn't really Java related since you can use diagrams or UML to define how your future code should be written for your program.
You should take a good look at what is required of your classes. READ the specification of the program carefully, and then you will know what methods you will need.
For instance, you might need the program to return the reference number of the flight booking, that means you will need a get-method to retrieve that value. Go through the specification and try to come up with what you need your code to do!
When you've done that, start to draw a diagram!
Take a look at this:
UML basics: The class diagram
I also wrote a post about this some time ago, not really going deep into class diagrams in particular, but overall UML and MVC.
Perhaps you can find it useful!
http://www.java-forums.org/new-java/...tml#post298433
Good luck!