Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Best way to learn Java before start of semester.

  1. #1
    Join Date
    Nov 2004
    Location
    Ottawa, Canada
    Beans
    66
    Distro
    Ubuntu 10.04 Lucid Lynx

    Best way to learn Java before start of semester.

    Well... I had a bad programming semester this year and almost failed the first class and dropped from the second. One of the concept that I can't get my mind into is the objects. What is the best way to practice?

  2. #2
    Join Date
    Aug 2007
    Beans
    949

    Re: Best way to learn Java before start of semester.

    Write programs.

    If you can't understand objects, you're going to have a lot of trouble doing Java my friend...after all, almost everything in Java has to do with objects, for better or for worse.

    What concepts do you not understand with objects? We can do our best to try to explain them to you since it sounds like your professor did a very poor job of it.

  3. #3
    Join Date
    Apr 2007
    Beans
    20
    Distro
    Ubuntu

    Re: Best way to learn Java before start of semester.

    Honestly I hate Java, with a passion. However, OOP is really easy to learn if you start writing little programs. Try writing an inventory program, that is something that could require a LOT of OOP. You don't necessarily have to attach a GUI to it, just make it a console application. Or make a program that uses the aminal kingdom (or plant kindgom).

    Just be like

    class Squamata : Reptillia, IOrder
    {
    Squamata() { // code }
    }

    class Serpentes : Squamata, ISuborder
    {
    Serpentes() { // code }
    }

    List<Animalia> listOfAnimals = new LinkedList<Animalia>()
    listOfAnimals.add(new Serpentes());

    you know, something like that.

    Practice, practice, practice. Now if you did fine on the programming projects, then you should really learn the terminology. Get in the habit of using it as much as you can. When you practice, write comments that explain what you did and what OOP methods you used.

  4. #4
    Join Date
    Mar 2010
    Location
    London
    Beans
    924

    Re: Best way to learn Java before start of semester.

    Out of interest why do you hate java?
    - "Make me a coffee..."
    - "No"
    - "sudo make me a coffee"
    - "OK"

  5. #5
    Join Date
    Mar 2010
    Location
    London
    Beans
    924

    Re: Best way to learn Java before start of semester.

    Quote Originally Posted by ctimko View Post
    class Squamata : Reptillia, IOrder
    {
    Squamata() { // code }
    }

    class Serpentes : Squamata, ISuborder
    {
    Serpentes() { // code }
    }

    List<Animalia> listOfAnimals = new LinkedList<Animalia>()
    listOfAnimals.add(new Serpentes());
    isn't that C# syntax?
    - "Make me a coffee..."
    - "No"
    - "sudo make me a coffee"
    - "OK"

  6. #6
    Join Date
    Nov 2004
    Location
    Ottawa, Canada
    Beans
    66
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Best way to learn Java before start of semester.

    Thanks guys, to reply to Soltanis, almost the whole mental concept about how the objects works.

    I know how the Matrix, arrays... work. Junit? A little bit of trouble.
    I just need a little bit of a guiding hand about how I can practice this summer so that I can be ready for this course: http://www.site.uottawa.ca/~turcotte/teaching/iti-1121/

    To give you an idea, I had a D *yeesh* on this course (Sorry, it's in french, I will try to find the english course): http://www.site.uottawa.ca/~garbez/iti1520/

    P.S Recommend me simple programs that I can do in order to practice, I know programming is like math.

  7. #7
    Join Date
    Jan 2009
    Location
    Dallas, TX
    Beans
    106
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Best way to learn Java before start of semester.

    isn't that C# syntax?
    That might explain why he hates java so much . . .


    You should find a tutor that knows java well. That way you can have someone there who can give you face to face feedback. Even the little things like coding style can make a big difference.

    The best way to become a good programmer is to program A LOT outside of your basic school requirements. Try thinking of some simple projects to try and gradually work on more complex projects.

    Here are some basic things you can do with Swing (or in a web browser if you're learning J2EE)
    Basic (one at a time):
    launch a window
    launch a window with a button in it
    a program that does something when a button is clicked on

    More Interesting:
    Make a text editor with basic functions like saving a file, copy and paste, print
    Make a drawing client (like Paint)
    Make a chat client with a GUI


    EDIT:
    One more thing . . .
    The API is your friend.
    http://java.sun.com/javase/6/docs/api/
    Last edited by cph05a; May 19th, 2010 at 10:30 PM.

  8. #8
    Join Date
    Nov 2004
    Location
    Ottawa, Canada
    Beans
    66
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Best way to learn Java before start of semester.

    Quote Originally Posted by cph05a View Post
    Here are some basic things you can do with Swing (or in a web browser if you're learning J2EE)
    Basic:
    launch a window
    put things in the window
    do something when a button is clicked on

    More Interesting:
    Make a text editor with basic functions like saving a file, copy and paste, print
    Make a drawing client (like Paint)
    Make a chat client with a GUI
    Right now, we're not learning gui... but I suppose I could start by writing programs that are not in the current curriculum.

    I've noticed programming is a lot like art, you need to have an imagination about what you want to accomplish and finding ways to do it.
    Right now, my mind is blank, I have no idea about what I should do.

    So for those who started studying programming, how did you start? because I've noticed that a lot of students in my class already did programming as their hobby.

  9. #9
    Join Date
    Mar 2010
    Location
    London
    Beans
    924

    Re: Best way to learn Java before start of semester.

    Lol at cph05a


    And indeed lots and lots of programming and mini projects. Swing (and AWT) itself is a very good demonstration of objects and inheritance.
    - "Make me a coffee..."
    - "No"
    - "sudo make me a coffee"
    - "OK"

  10. #10
    Join Date
    Nov 2006
    Location
    Vienna
    Beans
    36
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Best way to learn Java before start of semester.

    Go get a "Learn Java in 7 days" or whatever book. One that will at least have a chapter on Objects (perhaps the textbook from your prior class). You could also go check out the tutorials available at java.sun.com/docs/books/tutorial/java/javaOO/classes for example.

    Now pick a subject for your programming study that you know something about. What about your CD collection (you do own CDs, don't you)? Choose a domain you know so you can focus on the technology.

    Then model the CDs in your application. Being able to reference something concrete may make it easier to grasp the concepts.

    A CD has a title, an artist [for simplicity, a solo album might be best ], an ISBN number, publication date, and multiple tracks. Tracks would be a class of their own, with their own attributes; a track title, a play length, and a position come to mind.

    The class declaration is essentially a template telling you what a thing (object) of that type has, and can do.
    _why: When you don't create things, you become defined by your tastes rather than ability. Your tastes only narrow and exclude people. So create.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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