Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,146 members, 7,818,434 topics. Date: Sunday, 05 May 2024 at 03:46 PM

How Can I Learn OOP With Java? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / How Can I Learn OOP With Java? (4044 Views)

After 5 Months Of Learning OOP In Visual C#-here Is A Little Project I Made. / Learning To Program With Java by the Fulaman / Why Is OOP PHP So Confusing? (2) (3) (4)

(1) (Reply) (Go Down)

How Can I Learn OOP With Java? by Nobody: 2:19pm On Jun 20, 2015
I've been doing quite a bit of Java and written only a few programs OOP style so it's not entirely new to me. I have about three months to spare this holiday before beginning second year of Computer Science in September.

I work two to three days a week with more than enough free time during which I'd like to familiarize myself better with object-oriented Java programs before beginning second year, but I've found it's been proving somewhat difficult to find learning material.

In my school we are given assignment projects, with optional and fundamental requirements/specification, and we build the program following the specifications. Now that I'm trying to learn on my own, it's hard to find projects that I can work on.

To give you an idea what I'm looking for, here's one of my earlier assignments:



Q3
Implement a graphical Java application that allows a user to enter a message and have it shortened. The files ShortenerFrame.java and ShortenerGUIApp.java provide a starting point for this question.

In addition to the core functionality, your application should:
• have the messages in the text entry areas wrap to a new line if they are wider than the available space
• prevent the user from editing the shortened message
• provide an appropriate title for the window
• display an appropriate error message if the default abbreviations file could not be found (for example, this could be put in the output text area)

Marks available: 4


Two marks are available for implementing one of the following advanced features:
• allow the user to specify the abbreviations file to be used
• include an extra button that when clicked will retrieve the text currently in the Operating System’s clipboard and put it in the message input text area
• include an extra button that when clicked will copy the shortened message
and put it in the operating system’s clipboard

The full two marks can be obtained for correctly implementing one of these advanced features, but you may implement more if you wish.
Re: How Can I Learn OOP With Java? by Fulaman198(m): 3:22pm On Jun 20, 2015

1 Like

Re: How Can I Learn OOP With Java? by Fulaman198(m): 3:25pm On Jun 20, 2015
Stanford university in the united states has an entire video course on Java programming
Re: How Can I Learn OOP With Java? by GodMode: 3:34pm On Jun 20, 2015
Java is an OOP based language.. So if you can use java as well as you say... You already know OOP. gringringringrin

1 Like

Re: How Can I Learn OOP With Java? by Nobody: 3:57pm On Jun 20, 2015
GodMode:
Java is an OOP based language.. So if you can use java as well as you say... You already know OOP. gringringringrin
yeah Java is 100% OOP

1 Like

Re: How Can I Learn OOP With Java? by Nobody: 8:36pm On Jun 20, 2015
is like asking how to drink coke when your already knows how to drink water in fact java is 101% object oriented
Re: How Can I Learn OOP With Java? by Nobody: 10:42pm On Jun 20, 2015
It's kind of hard to explain. I know Java is an OOP language but I'm talking of programs that use other java functions like inheritance, abstraction etc. I feel the best way to learn would be to practise writing programs using those functions, not just creating classes and objects.
Re: How Can I Learn OOP With Java? by GodMode: 12:08am On Jun 21, 2015
Velocitron:
It's kind of hard to explain. I know Java is an OOP language but I'm talking of programs that use other java functions like inheritance, abstraction etc. I feel the best way to learn would be to practise writing programs using those functions, not just creating classes and objects.

Its OOP.. You'll get used to it with time..
Re: How Can I Learn OOP With Java? by 53cur3m0d3(m): 1:22am On Jun 21, 2015
Velocitron:
It's kind of hard to explain. I know Java is an OOP language but I'm talking of programs that use other java functions like inheritance, abstraction etc. I feel the best way to learn would be to practise writing programs using those functions, not just creating classes and objects.

I'll suggest you take it easy ma'am. You can't learn it all in a day or few weeks. It's Programming for Christ's sake and it's very vast. Apart from life and oxygen, I think Programming should come next in terms of vastness.

The problem with you is you're putting yourself under pressure to finish learning Java within a short period of time. Hell No, that's impossible ma'am.

How you understand a problem will determine your approach to solving it. We all have ours. You just have to get your rhythm and flow with it.

Learn at your own pace so you can fully grasp every concept you come across.

JAVA! MY FIRST LOVE! cheesy

1 Like

Re: How Can I Learn OOP With Java? by Nobody: 1:46am On Jun 21, 2015
53cur3m0d3:


I'll suggest you take it easy ma'am. You can't learn it all in a day or few weeks. It's Programming for Christ's sake and it's very vast. Apart from life and oxygen, I think Programming should come next in terms of vastness.

The problem with you is you're putting yourself under pressure to finish learning Java within a short period of time. Hell No, that's impossible ma'am.

How you understand a problem will determine your approach to solving it. We all have ours. You just have to get your rhythm and flow with it.

Learn at your own pace so you can fully grasp every concept you come across.

JAVA! MY FIRST LOVE! cheesy

I won't say I'm trying to learn it, per se, I just want to write a few programs using inheritance, abstraction, different access levels etc, just so I can have a better idea of how they work. Like I said, I don't want to go into second year with an empty head.
Re: How Can I Learn OOP With Java? by 53cur3m0d3(m): 3:05am On Jun 21, 2015
Velocitron:


I won't say I'm trying to learn it, per se, I just want to write a few programs using inheritance, abstraction, different access levels etc, just so I can have a better idea of how they work. Like I said, I don't want to go into second year with an empty head.

Oh! I see!
Re: How Can I Learn OOP With Java? by Fulaman198(m): 7:04am On Jun 21, 2015
Velocitron:


I won't say I'm trying to learn it, per se, I just want to write a few programs using inheritance, abstraction, different access levels etc, just so I can have a better idea of how they work. Like I said, I don't want to go into second year with an empty head.

Keep watching all the lecture videos I posted.
Re: How Can I Learn OOP With Java? by whisperj: 9:01pm On Jun 21, 2015
If you could lay your hands on "Java : How to program" by Deltel Deltel, it will do you a whole lot of good. That's how I learnt anyway. Three months is a lot of time to get familiar with the basics. Btw, your new dp is ... lipsrsealed . I really loved the former one with that dashing smile of yours..lol
Re: How Can I Learn OOP With Java? by GateKeeper247: 9:25am On Jun 22, 2015
@Velocitron You see object orientation is not that complex it only allows you to model, what you are trying to build from the real world objects; prior to that when building software systems it was mostly procedural; where you just write functions/routines/methods to do things haphazardly it was fine; except well its easy to get messy; then now look at object orientation; where for instance if you're building a system for ships in a shipyard; you try to bring in everything from the real world into the digital world you're modelling; for instance you're need to have or model ship classes from which particular ship objects can be built, and what behaviours do ships have that you're interested in modelling might be things like plungeToDuck, Accelerate, Stop, OffloadVessels, so everything related to this objects go with them in code. and the objects you're trying to build contain their properties/members/variables and methods to manipulate them. Same thing for a hospital system you're need objects/entities such as doctors, nurses, tests, appointments, which are real world concepts you make classes to represent these and build the interaction as it is in the real world in your digital model/system.
Inheritance is a code reuse construct just like we inherit attributes and somethings from our parents in the realworld so in your digitalworld it would be wise to inherit from a general/generic object to more specific objects that; So also is polymorphism (which means many forms) like in the realworld a postgraduate student, an undergraduate student, and a vocational student are all students right; maybe their registration process is somewhat different; so you don't care about the difference you want to be able to call each object/entity and allow it to do its own specific version of a behaviour when called. Interfaces well are contracts that classes who sign or agree to implement must provide definitions for, Got to go; if you want to understand these concepts deeper do give the book "Thinking in Java" by Bruce Eckel a read; best book on object-orientation with java; except its quite abstract. Also read about smalltalk you'd get a hang of what object orientation is. N.B sometimes you might be modelling things like Complex Numbers, Points, Shapes and how to move them around for some reason but its all the same thing at the end of the day. Do have a nice day, Cheers!!!.
Re: How Can I Learn OOP With Java? by Nobody: 3:23pm On Jun 22, 2015
Thanks you guys, I really appreciate the help grin
Re: How Can I Learn OOP With Java? by Nobody: 3:25pm On Jun 22, 2015
whisperj:
If you could lay your hands on "Java : How to program" by Deltel Deltel, it will do you a whole lot of good. That's how I learnt anyway. Three months is a lot of time to get familiar with the basics. Btw, your new dp is ... lipsrsealed . I really loved the former one with that dashing smile of yours..lol

Thanks! Although, I thought I looked a little too old in the previous photo embarassed
Re: How Can I Learn OOP With Java? by ToyinDipo(m): 9:11pm On Jun 29, 2015
That a language is 100% OOP, doesn't automatically mean a programmer writing in that language will follow OOP design patterns. That's why even in Java textbooks you will find some sections dedicated to OOP concepts. OP, you seem familiar with OOP concepts already, just write your code in a way that you don't repeat lines of code, thus you will find your self automatically integrating OOP concepts you may have learnt or will still learn.
Re: How Can I Learn OOP With Java? by FincoApps(m): 6:55am On Jun 30, 2015
I think I understand what she means. Like she said, she knows Java is OOP but how to implement it. I know Java well enough to create my own apps for mobile or games or debug codes, but I also know I didn't used to use the 100% OOP features. Velocitron, what I would advise is that when coding, try to use the OOP features like inheritance etc... to make your code look shorter.

For example, when you have an app that has 3 or more screens and most of the objects in the screen are similar, then you can create a base class for it and let your other screens inherit from this base class. This way you would be implementing OOP.

Since you said Java is not new to you. No need to keep on reading Java tutorials(Except you wantt to be a java professor/lecturer). Read on Java design Patterns.
Re: How Can I Learn OOP With Java? by FincoApps(m): 7:00am On Jun 30, 2015
For example the first time I saw Pcguru1's code, even though I was good in Java, I was still shocked at the way it was arranged and the way all OOP concepts were implemented. I too need to master Design patterns to start writing codes like that grin grin grin grin
Re: How Can I Learn OOP With Java? by Nobody: 3:26pm On Jun 30, 2015
FincoApps:
I think I understand what she means. Like she said, she knows Java is OOP but how to implement it. I know Java well enough to create my own apps for mobile or games or debug codes, but I also know I didn't used to use the 100% OOP features. Velocitron, what I would advise is that when coding, try to use the OOP features like inheritance etc... to make your code look shorter.

For example, when you have an app that has 3 or more screens and most of the objects in the screen are similar, then you can create a base class for it and let your other screens inherit from this base class. This way you would be implementing OOP.

Since you said Java is not new to you. No need to keep on reading Java tutorials(Except you wantt to be a java professor/lecturer). Read on Java design Patterns.

Thank you, couldn't have said it better myself! I understand how they work theoretically but my code tends to be redundant and overcomplicated sometimes. I'd just like to practise using those OOP features by working them into my code when solving problems. My problem now is finding good source material for coding problems to practise with.
Re: How Can I Learn OOP With Java? by FincoApps(m): 6:03pm On Jun 30, 2015
You welcome smiley
A way to make your code better is to look for a way to get rid of repeated codes by using methods or class i.e Don't rewrite a whole class just because it does one thing differently (I used to make this mistake especially when in a hurry). Instead, try to use constructors, methods, method overloading etc. To conquer this kind of problem.

Saw some results on google concerning projects you can try
http://projectsgeek.com/
http://freesourcecode.net/javaprojects#.VZLKSPmqpBc

Velocitron:


Thank you, couldn't have said it better myself! I understand how they work theoretically but my code tends to be redundant and overcomplicated sometimes. I'd just like to practise using those OOP features by working them into my code when solving problems. My problem now is finding good source material for coding problems to practise with.
Re: How Can I Learn OOP With Java? by Nobody: 6:33pm On Jun 30, 2015
FincoApps:
You welcome smiley
A way to make your code better is to look for a way to get rid of repeated codes by using methods or class i.e Don't rewrite a whole class just because it does one thing differently (I used to make this mistake especially when in a hurry). Instead, try to use constructors, methods, method overloading etc. To conquer this kind of problem.

Saw some results on google concerning projects you can try
http://projectsgeek.com/
http://freesourcecode.net/javaprojects#.VZLKSPmqpBc



Thank you soooo much. You've been so helpful! wink

1 Like

Re: How Can I Learn OOP With Java? by epospiky(m): 6:26pm On Jul 09, 2015
FincoApps:
You welcome smiley
A way to make your code better is to look for a way to get rid of repeated codes by using methods or class i.e Don't rewrite a whole class just because it does one thing differently (I used to make this mistake especially when in a hurry). Instead, try to use constructors, methods, method overloading etc. To conquer this kind of problem.

Saw some results on google concerning projects you can try
http://projectsgeek.com/
http://freesourcecode.net/javaprojects#.VZLKSPmqpBc


I also want to learn java programming so well and this to me is very handy.Thanks dude!

1 Like

Re: How Can I Learn OOP With Java? by isacolukay(m): 12:48pm On Jul 10, 2015
Sup folks. I am trying my hands on Java programming and I hope I will enjoy it. My problem is that whenever I try to create a class after writing a code, it brings up an error message as shown in d picture below. Kindly help me out so that I can proceed with my learning.

Re: How Can I Learn OOP With Java? by FincoApps(m): 12:57pm On Jul 10, 2015
Add ".java" to HelloWorld so it should be javac HelloWorld.java
isacolukay:
Sup folks. I am trying my hands on Java programming and I hope I will enjoy it. My problem is that whenever I try to create a class after writing a code, it brings up an error message as shown in d picture below. Kindly help me out so that I can proceed with my learning.
Re: How Can I Learn OOP With Java? by isacolukay(m): 1:45pm On Jul 10, 2015
FincoApps:
Add ".java" to HelloWorld so it should be javac HelloWorld.java


Thanks so much bro, It worked!

1 Like

Re: How Can I Learn OOP With Java? by lordkid: 10:30am On Jul 14, 2015
Do you want to be a professional in Dynamic Web Design and
Developement,JAVA, C#, C++, Mobile Apps Development?? Do you want to
design or LEARN how to design a Dynamic website like Facebook,
Twitter, Youtube, OLX, Konga and mush more, do you want to build a
career in ICT?
contact :08039162139
or visit : gita.com.ng
for more information
Whatsapp Group : 08039162139
send a message with the keyword "GITA" to
the number and you will be added to our whatsapp Group.

(1) (Reply)

How To Spot A Bad Software Developer / Future Of Software Development In Nigeria In The Next 15 Years / How To Fix Google Adsense Identity Verification Fail Within 30 Minutes ( VIDEO)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 54
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.