Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Programm assignment ... that I need help with

  1. #1
    Junior Member
    Join Date
    Feb 2020
    Thanked 0 Times in 0 Posts

    Default Programm assignment ... that I need help with

    Hello users,
    Iīve just registered!

    I am a student and also happen to have computer science. Now we have a task that is to be finished within 2 weeks. Unfortunately, I am pretty new to programming, and this assignment is a bit more complex than the previous ones. My main problem is just understanding how to link things.

    The task shortly summed up: We have to a programm a railway. First you have train tracks, which is a line from point A to point B (so 2D-coordinates). Train tracks can only be horizontal or vertical. After having added the first train track, the second should connect to the first at one end and so for every next trail track that you add. You can also connect horizontal and vertical ones.
    And secondly, you have lots of different wagons (like 3 categories of wagons, and to every of those categories you have 3 subcategories). There are many methods, which I should be able to program I think, like "add track", "remove track", "add train" (adds wagon to Train), "delete track", "list track", "list wagons" and many more. One must be able to add wagons onto the train tracks (length and coordinates should fit, if not then error message), and to connect the wagons to a train. (Every wagon has its own ID, so some will, some wont connect).

    In the end the user should be able to type commands like "add track (2,3) -> (2,6)" (add track <startpoint> -> <endpoint>), and as a result a track would be added (and saved), and so on. The next track would have to start/end at (2,3) or (2,6), be horizontal or vertical, and not cross the first track, or an error message will have to appear.
    Finally, the trains even have a direction of travel and will be able to run, and also to collide, after which they would be taken from the tracks, "but not from the train data storage".

    Okaaayy. So. How are all These things linked together? How does one link them together? I donīt even know where to begin with. Itīs hard to decide what of these things are classes, where are objects, how the track is saved after itīs been added. Right now, I am even failing to make a class for the train track.

    I would very thankful for some help and advice.

  2. #2
    Junior Member
    Join Date
    Feb 2020
    Thanked 0 Times in 0 Posts

    Default Re: Programm assignment ... that I need help with

    Web designing trends in 2020

    When we look into the trends, everything which is ruling today’s world was once a start up and slowly begun getting into. But Now they have literally transformed our lives on a tremendous note. To name a few, Facebook, Whats App, Twitter can be a promising proof for such a transformation and have a true impact on the digital world.

    we have offered to the advanced syllabus course web design and development for available join now

    more details click the link now

Similar Threads

  1. java programm
    By prakash16 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 25th, 2017, 07:13 AM
  2. please can you help me this programm
    By abdi in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 5th, 2014, 07:15 AM
  3. Programm does not start. Help Please!
    By efluvio in forum What's Wrong With My Code?
    Replies: 11
    Last Post: March 8th, 2013, 02:55 PM
  4. Creating a programm
    By TheBoss84 in forum Java Theory & Questions
    Replies: 2
    Last Post: October 23rd, 2011, 02:36 PM
  5. Can't run Game of Life programm
    By cutekill0 in forum What's Wrong With My Code?
    Replies: 24
    Last Post: September 13th, 2011, 08:30 AM

Tags for this Thread