Java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thinboy
    New Member
    • Feb 2007
    • 34

    Java

    Hi I need help starting my Java work, this is the scenario:

    This system is intended to provide the school timetabler with information to support his/her timetabling activities. Please note it is not expected to schedule classes. The information required are the programmes, the core and option modules for each programme, the activities (lecture, seminar, lab etc) connected with each module, the available rooms and their type and the module leaders. Some level 3 and masters modules are run together. The system should tell the user when this is the case. Module and module leaders in the system may have some constraints attached. For example “Staff member X does not teach on Tuesdays” or “Module Y must have 6th floor labs”. Information required includes the number of credits for each module, whether it is one semester long or all year long, which semester it runs and which student sets take the module (either as core or option).Room information should include its size (how many students it takes), it’s type, its condition (i.e. walls falling down, freezing cold, noisy) and its resources (internet connection, overhead projector white/black board, amplification system). Programme information should include the level, name of the programme and the associated modules.
    The output should be text based. No graphical interface is required. You may use any libray classes you feel necessary. You do not need to test the system with complete data from the school. Just use one or two programmes. You can make these up. They do not have to be an accurate reflection of the schools programmes and modules.
    Examples of use
    1: Input: program name Output: list of core and option modules.
    2: Input: module name Output: module leader, activities, credits, when run, constraints
    3: Input: activity name Output: room(s)
    4: Input room number Output size, condition, available resources
    5: Input module leader Output constraints


    How do i make a simple program to do this. The following are my classes:

    Module Leader
    Program
    Module
    Activity
    Room
    Constraints
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    You said you were having problems starting it, but you say you have classes to work with. Have you outlined your classes in UML to figure out what methods and values it contains? That's where I'd start...

    Comment

    • thinboy
      New Member
      • Feb 2007
      • 34

      #3
      Hi,

      Ive done my UML, But i'm unsure how to start the code

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Have you coded those classes?

        Comment

        • BigDaddyLH
          Recognized Expert Top Contributor
          • Dec 2007
          • 1216

          #5
          Originally posted by thinboy
          Hi,

          Ive done my UML, But i'm unsure how to start the code
          Are you familiar with Test-Driven Development (TDD)?



          That might be something to think about.

          Comment

          • thinboy
            New Member
            • Feb 2007
            • 34

            #6
            Hi,

            No i have not coded those classes as i dont know where to start. What would be the easiest class to start on? Could you show/tell me how to make a menu or something which would make the program work (please see examples of use)

            Thanks

            Comment

            • sicarie
              Recognized Expert Specialist
              • Nov 2006
              • 4677

              #7
              Originally posted by thinboy
              Hi,

              No i have not coded those classes as i dont know where to start. What would be the easiest class to start on? Could you show/tell me how to make a menu or something which would make the program work (please see examples of use)

              Thanks
              If you have the UML, you have the outline for each class. Code that.

              Comment

              • thinboy
                New Member
                • Feb 2007
                • 34

                #8
                what do you mean vode that, all i have are set values

                Comment

                • thinboy
                  New Member
                  • Feb 2007
                  • 34

                  #9
                  would a menu work for the exaples of use as i dont know where to start

                  Comment

                  • JosAH
                    Recognized Expert MVP
                    • Mar 2007
                    • 11453

                    #10
                    Originally posted by thinboy
                    would a menu work for the exaples of use as i dont know where to start
                    A menu is just a visual representation of a few options the use can select from,
                    If your situation is applicable, by all means use a menu,

                    kind regards,

                    Jos

                    Comment

                    • thinboy
                      New Member
                      • Feb 2007
                      • 34

                      #11
                      Hi, How would i make a Java Menu?

                      Thanks

                      Comment

                      • BigDaddyLH
                        Recognized Expert Top Contributor
                        • Dec 2007
                        • 1216

                        #12
                        Originally posted by thinboy
                        Hi, How would i make a Java Menu?

                        Thanks
                        You should start with the coding you know how to do.

                        Comment

                        • thinboy
                          New Member
                          • Feb 2007
                          • 34

                          #13
                          Hi Can some explain for me by giving me examples osf code etc so i can learn

                          Thanks

                          Comment

                          • sicarie
                            Recognized Expert Specialist
                            • Nov 2006
                            • 4677

                            #14
                            Originally posted by thinboy
                            Hi Can some explain for me by giving me examples osf code etc so i can learn

                            Thanks
                            No. Nobody here is going to give you code.

                            You said you had UML of your classes. You should code those. If your UML does not accurately translate into your classes, you need to revisit your design - make sure you know what you are trying to do before you jump in and try to code something.

                            If your UML is accurate, then it should be an outline of your classes, and how they interact with each other - giving a very abstract diagram of your program's architecture.

                            (And I would also agree with BigDaddyLH - you should at least design this with your tests in mind, if not code it with them. My Java teacher in college was huge on developing clear tests first, and then coding. I personally thought that was cheating (as you could then code specifically to pass the test), but that got into "what is a good test" etc...)

                            Comment

                            • thinboy
                              New Member
                              • Feb 2007
                              • 34

                              #15
                              Ive been reading up on stuff and started to understand a little more but i dont know how to use input and output feature's is there a way to input a name say and output a list?

                              Comment

                              Working...