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.


>> REGISTER NOW TO START POSTING


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

Page 1 of 2 12 LastLast
Results 1 to 25 of 39

Thread: City Transportation Program

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default City Transportation Program

    Hello! First and foremost, I apologize if this has ended up in the wrong forum. I'm just a beginner here! But I will design a program that will take care of public transportation in a city (fictional). I wish that when you visit a particular site it is deducted money from one account (the account is only in Java, there is no person who owns the account), just by breaking into a home. Is it possible to do, in that case how? What should I do if it does not work?

    Sincerely Henrik.V, Novice programming.

    PS. Sorry for my bad English! I translated with Google Translate! DS.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    What should I do if it does not work?
    Post the code and the full text of the error message.
    Add comments about your problem.

  3. #3
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    I have no code, yet, there's nothing wrong with the code (I dont have). I meant: How do I do if my example does not work?. Sorry if you perceived it that way.

    Sincerely Henrik.V, Novice programming

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    How do I do if my example does not work?.
    When you have problems, post the code here and the full text of the error message.
    And if necessary ask some questions about your problem.

    There are hundreds of other posts here that have done the same thing. Look at some of them.

  5. #5
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    Sorry, but you've misunderstood! I have no code! I have nothing that can go wrong, I'm just wondering: If you can not do as I say, what do I do? Excuse me for a somewhat dramatic message

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    If you can not do as I say, what do I do?
    I'm not sure what you are asking.
    You design the program and write some code.
    When you do get some code that you want help with, please copy and paste it here with your questions.

  7. #7
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    Sorry, that's the bad English. But I have not written any code yet. I need your help how to write code. I want to construct a program that takes care of public transportation in a city. The only thing I have written is a program that could keep track of different people's balance. There one can do about making it the number of "ride" a person has. When you pay, you pay a year. Take one can then buy for cash. I wish that when you visit a website, be it of a "go" from that person's account. If you can not do that when you visit a website to pull the "go" from a person's account, are there any alternatives if I want it to be the "go" from a person's account. You must understand, I have almost no code, and the little code I have works well.
    Excuse me for even a translated message dramatically.

    Sincerely Henrik.V

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    I want to construct a program that takes care of public transportation in a city.
    Is the program to schedule when and where the buses and trains are to go?
    Should it consider the number of passengers on each route and the possibility of a break down of a train or bus so that the city will know how many extra buses and trains it should have to be able to keep supplying the city with transportation?

    You will have to ask specific questions or post your code and ask questions about it.

  9. #9
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    No, not really, it should keep track of how much money different people have in their account. When I go into a special website deducted the money from that account. The code I do not know at all how to draw. That's why I want your help

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    Is this a different problem?
    A transport system would work with buses and trains and passengers.
    Businesses and banks work with accounts.

  11. #11
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    No, it's not another problem. I just want to take care of ticketing for public transport. I do not take care of the buses and trains. Only tickets. Hope you understand

  12. #12
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    Do you have a design for how the program should work? What steps it needs to do to solve the problem?

  13. #13
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    No, nothing like that.But what defines you as "Design"? Is not that good at Java programming.

  14. #14
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    You should translate the word design. I used it as a noun. It is also a verb.

    Before you can write a program you must know what you want the program to do. The process of thinking about what you want the program and deciding what steps the program must take is what I am calling making a design for your program. It is a big waste of time to try to write a program without a design.

  15. #15
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    Ah, okay, now it's me who misunderstand The goal of this program is that said it should be in charge of ticketing for public transport in the city. The software that can count up or down a variable by visiting various websites. I'm getting more doubtful whether it is possible in Java.: ( Let me know if you need more information, maybe a little bad description
    Last edited by henrikv; August 15th, 2011 at 01:46 AM. Reason: More text

  16. #16
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    If you know what you want the code to do, when are you going to start writing the code?
    If you have problems with your code, copy and paste it here with your questions.

  17. #17
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    Okay, now I understand! It is just this that I am a beginner, but hope this will go well anyway! But then I have only one question: Does anyone know how to do, if you want when you visit a particular site it is deducted money from an account that is in Java? Thanks anyway

  18. #18
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    when you visit a particular site
    What kind of website are you trying to connect to? Does it have an html logon page?

    it is deducted money from an account
    Does the site have an account for you that you want money deducted from?

  19. #19
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    Yes, it is an html page. And no, there is nothing on the HTML page. Should I make some sort of applet and "apply" on the homepage?

  20. #20
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    How are you doing with the project?

    You haven't given enough description of your project to know if you should use an applet or a application.
    Do you need a database on the server to save ticket information in?

  21. #21
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    At first I had thought me a program, but you need an applet for it to work? Regarding the database, I think I need one, to store information.

  22. #22
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    This is getting to be a big project for a beginner. I suggest you start with something small, learn how to design and code a minimal project and then expand to this larger project.

  23. #23
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    Okay, but it is possible to do so in Java? Is it possible to do that when you visit a particular site it is deducted money from one account? What kind of code look like? I will at least start with something small, then it should be allowed to grow larger.

  24. #24
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: City Transportation Program

    I think it is possible, but without enough details about what the program is to do, I am not sure.

  25. #25
    Junior Member
    Join Date
    Aug 2011
    Location
    Nacka, Sweden, Europe
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: City Transportation Program

    What do you want to know more about the program

Page 1 of 2 12 LastLast

Similar Threads

  1. Help with class program!!! STUCK! Program not doing what I Want!!!
    By sketch_flygirl in forum What's Wrong With My Code?
    Replies: 7
    Last Post: April 4th, 2011, 07:29 AM