Results 1 to 11 of 11
  1. #1
    behedwin is offline Member
    Join Date
    Oct 2012
    Posts
    26
    Rep Power
    0

    Default Explain my assignment

    Hey

    I am doing a course where i am learning very basic Java and UML
    The first 4 weeks we have focused on UML and the assignment was to create a Class Diagram over a library system.
    This is done and now we look at Java.

    The course have very little contact with the teacher and we are on our own most of the time.
    So now i ask people here to break down the assignment (not do the assignment for me ofc), just so I can understand it better.

    This is the text for the assignment
    The obligatory requirement to pass the assignment (to get E): The project code must include the source codes for all the classes from your approved UML class diagram from the previous assignment.
    So i got my UML diagram
    Now i need to learn

    What is a source code
    What should each class contain... Personally since i dont have ANY knowledge of this before i miss a more clear description of the assignment.
    Maybe you see something i dont?

    Anyway
    What is a source code. If you can... explain it for someone that dont know Java at all.

    I am following
    thenewboston on youtube learning Java.
    The tutorial is really good.
    I have watched on the first 25 episodes and learned allot. Tho i still dont really know how to use my knowledge in my assignment.
    Basically i know how to do math with Java so far :p
    Last edited by Tolls; 10-10-2012 at 02:51 PM. Reason: changed code tags for quote tags

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Explain my assignment

    Source code is the Java code (the .java files).
    The stuff you can read (and write).
    eg
    Java Code:
    public class SomeClass {
       private int id;
       public int getId() {
          return id;
       }
    }
    The above would be in a file called SomeClass.java

    That then gets compiled into .class files, which is byte-code, that the JVM runs.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    behedwin is offline Member
    Join Date
    Oct 2012
    Posts
    26
    Rep Power
    0

    Default Re: Explain my assignment

    ah it was that easy....

    So when having an UML Diagram (class diagram) of a system.
    how to work on that and make it into Java code...

    Me and my group have done a UML diagram of the system we are to write in Java.
    But we are a bit lost in the understanding of where to start and what each .java file should contain...
    I know it is quite vague question....

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Explain my assignment

    Each class in your class diagram becomes a Java class, in its own .java file.
    That covers your data model.
    You will also need some form of controller structure which will handle the flow of data, based on your interaction diagrams.
    And some form of front end (view) if you have one.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    behedwin is offline Member
    Join Date
    Oct 2012
    Posts
    26
    Rep Power
    0

    Default Re: Explain my assignment

    ok cool then it was as i thought.
    each class from the diagram is its own separate .java file

    now i just need to figure out what each class needs :)

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Explain my assignment

    The class diagram should have methods and (possibly) attributes.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    behedwin is offline Member
    Join Date
    Oct 2012
    Posts
    26
    Rep Power
    0

    Default Re: Explain my assignment

    yeh absolutly, i meant the java class :)

    our UML diagram is basically done...

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Explain my assignment

    Well, the java class needs those methods and attributes, as a minimum.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #9
    behedwin is offline Member
    Join Date
    Oct 2012
    Posts
    26
    Rep Power
    0

    Default Re: Explain my assignment

    hm the word method make me uncertain... have i missed something.

    In my head i got a UML diagram that is built up by classes, relationships, attributes and operations.
    method is that what i say is relationships... the different connections between the classes (the line)?

    i should know this, but better ask so i dont mix something up now :S

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Explain my assignment

    Operations are methods.
    Sorry, should have made that clear.
    In the standard class box, the attributes are the bit at the top, and the methods (operations) are the bit at the bottom.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  11. #11
    behedwin is offline Member
    Join Date
    Oct 2012
    Posts
    26
    Rep Power
    0

    Default Re: Explain my assignment

    ah then i follow, just different words but we meant the same thing.

    i have started with a few java tutorials.
    so far i have just learned how to do different math things, learned about int, boolean, double, if, else if, scanner and some other things.
    maybe it will be linked up into something more "usefull" that i can understand how to use for my assignment later... we will see.
    but at the moment i cant see how i can use the knowledge i have so far for the assignment.


    thanks allot for taking the time to answer my questions!!

Similar Threads

  1. Please Help explain my assignment!!!
    By gnarkill10 in forum New To Java
    Replies: 30
    Last Post: 08-05-2012, 03:57 PM
  2. can someone explain what this exactly does?
    By liluma in forum New To Java
    Replies: 4
    Last Post: 08-21-2011, 08:58 PM
  3. Replies: 2
    Last Post: 12-13-2010, 02:34 PM
  4. Replies: 3
    Last Post: 12-13-2010, 08:22 AM
  5. Can somebody explain me this plz
    By ccie007 in forum New To Java
    Replies: 4
    Last Post: 05-20-2010, 08:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •