• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java UML Class  RSS feed

 
Alex Arcay
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

Firstly I must say what an excellent forum this is, I'm very happy I found it. I have been tasked to create a UML class diagram and an object diagram, unfortunately I have no idea how to put it together.

The application I have been coding is a simple calculator with four different functions (add, subtract, multiply and divide).

Here is my code, any help would be appreciated!

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37465
539
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex,
Welcome to CodeRanch!

The second diagram on this page shows a class diagram.


Since you only have one class and no instance variables, your class diagram will be very simple. It'll be a box with an empty top section and the methods in the bottom section.

An object diagram doesn't apply because you don't have any states - only static methods. Maybe your teacher wants you to have instance variables?
 
Alex Arcay
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your helpful message. I would like to just ask if you think I can complete this task simply? I am trying to get signed off my course as soon as possible (before university in September) and this is the last thing holding me back unfortunately! I have already made the calculator, I just need to make the diagrams.

My task information for this part:

3a) Design an OOP application using UML Class and Object diagrams that represents a Library management system. The scope of the application is up to you in terms of how simple or complex it is, but it must be realistic in its considerations of different objects and attributes. – P3

3b) Implement a working object oriented application based on the Library management system designed above. The application must accurately replicate the class and object diagrams designed above.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37465
539
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The assignment talks about a library, not a calculator. Also, I don't think your calculator program is designed in a way that will let you complete the assignment.

In order to complete this task, it looks like you are going to have to learn about instance variables and how to create a program with multiple classes. Luckily, September is a few months away so you have plenty of time.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!