Results 1 to 11 of 11

Thread: ideas for a starter program

  1. #1

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604

    ideas for a starter program

    hi

    i have been learning java for about 4 months now, and i was after a little project to do to get some more programming expericence, does anyone have any ideas, i would like to use swing as well as i haven't used it that much


    cheers

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    try a java chat client & server. i advise doing a console chat first, then convert it to a swing app

  3. #3
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    Nah, stay away from the sockets for your first program, yeah java makes sockets easier but try something without them first. Make tic tac toe, yes it is not exciting, but you will definately utilize what you have learned those four months. Start it off with good design, ie. what classes are you going to need, player, board, etc. how are they going to interact with each other.

    I would recommend staying off swing for a while too, get a good understanding of java and then move on, swing is easy as long as you have a good base of java, if you try to do without it, it could make things a little more interesting...

  4. #4

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    i have done a tic tac toe game already with a little help from people but i want a project that i can do all by myself

    and i think that you are right a little chat thing does sound a little too advanced, where would i start ??, what sort of things would i need to include??

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  5. #5
    Lively Member tcullen's Avatar
    Join Date
    Nov 2001
    Location
    Kent, England
    Posts
    66
    how about a time management program to monitor staff ins / outs & hours worked pay etc

  6. #6

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    right i have decieded to do the chat program thing, but what sort of things do i need to research

    i know that i will need a client and a server version, and that is about it

    also will i be able to get it to work on 2k ??

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  7. #7
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332
    or you could try a SWING calculator
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  8. #8
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    Yeah you can get it to work on W2k.

    Some things you will need to learn.

    Sockets-A socket is way for communication to occur, such as TCP or UDP.

    Threads.

    You are going to need to make your server multi-threaded, maybe using a thread pool of sorts.

    The server will need to have a listener on a port for new connections, when it gets one, it will dish the client off to one of its threads from its pool, that way communication between the two can occur, and the server can still be waiting and listening for possible new connections.

    The client will be relatively simple, communicate with the server via the socket.

    Depending on how far you take this you also add more complexity, such as do you want to make a class that is the carrier of the data back and forth? Permissions can be a thing to worry about as well, unless you have your own web server you could run into permissions problems with applets. Just remember the applets sandbox. Or just use applications.

    I made an applet multiplayer environment for fun last spring. It gave the users the ability to log in, talk with users in a game room, join a table with a game on it, such as tic tac toe and connect 4. I wrote my own web server to push it out to the web since the admin at the site was being a pain.

  9. #9

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    well i am running my own webserver so i don't think that permissions will be a problem, so i think i will go and research sockets at the moment

    can you suggest anywhere to look ??

    cheers for the help people, i will keep you up to date with my progress

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  10. #10
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    depending on how comfortable ya feel, if you are good, all you should really need is the classes and their methods, which can be found in the doc.

    Their are probably some examples on the web, but be careful, you want to learn this on your own so you gain more out of it and retain it better. So do not copy too much code.

  11. #11
    Member shamloo's Avatar
    Join Date
    Oct 2000
    Location
    Stockholm, Sweden
    Posts
    32
    I'm trying to learn java and I have a just started on my first project which I'll probably never finish

    I don't know if anyone here played nhl 94 on Sega (my all-time favorite game!!), but I have a sega emulator on my computer and I was
    thinking of rewriting the game into a java game with similar look and feel, functions and so on.
    The code I have got is compiled(?) assembly so I don't understand a thing from it.
    That means I will have to start from scratch so I'll learn while I'm developing it!

    Anyhow, I just began learning java and have realized that I don't have enough java-knowledge yet, not even close.
    But as I'm learning I will continue the development of this little baby of mine It will probably take me a few years...

    Here is a link to the already working game(with some minor bugs, not written by me): http://hem.passagen.se/shamloo/misc/nhl94.zip

    Oh, if these kind of files(emulators) are illegal I'll remove the link asap.

    David
    "There are no must's in life unless you provide for someone else than yourself"

Posting Permissions

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



Click Here to Expand Forum to Full Width