What page is it?
o_o Happens I'm reading the same book. LOL, so if I understand it I'll try to explain.
Okay so, this weekend I have no internet (I know FFS all my friends had plans even tho I make going out with a girl the rest of it it was boring as hell)
So, I started reading a c++ guide wich I SORT OF understood till the part I got troubled up with. But before I wanted to ask, if could anyone SIMPLY explain to me what object-base (or something like that) coding is. (I think they name it as OOP). I must have read it like 10 times but can't get what it means. (Note that I'm only 14 I do not have much acces to coding class, and english is not my first language even tho I'm reading a guide that it is), by the way the guide it's called "Prata - C++ My Primer Plus (5th Ed.) Good guide I believe just a bit hard.
OOP = Object Oriented Programming.
Most everyone now days uses OOP. It allows for encapsulation, inheritence, interfaces, and a lot of other neat things that you... probably don't understand want I'm talking about right now. Basically it increases re-usability of code, which is important, and help when programming really complex programs that have a lot of parts that need to work together.
The more you read the more you will understand what that means.
juanrineytor (10-06-2009)
yeah, took me a while, googled some things, and just figured it out, took me 2days to figure out how to make a .dll for myself ****without**** a compiler
Ok so if you are making a dll without a compiler, you just have the source code in a file, doing nothing. I don't think you understand what a compiler is. There is no way you can make a program in C++ without using a compiler (Unless you use an interpreter, but i haven't seen very many of those, just like 1 or 2);
Again I call BS... can someone ban this clown? (or did someone already?)
Are you calling me bs? what for if you are? and Thanks a lot Why06 really helped me.
A question just for you, Didn't you had a same acc with a simillar name ? or did that got banned? or your just a copier? O.o
It's in the first chapter and the 2nd one will tell you later about exact ones.
Why06 again so OOP means that it lets you re-use the code? Oh wow if it's just that. But why "Object Oriented"?
Last edited by juanrineytor; 10-06-2009 at 03:53 PM.
Sorry No not you, that dylan clown who's posting the same nonsense everywhere...
YOU actually had a decent intelligently formed question and in better English than most others s
With OOP it makes you think in 'objects' with methods and Properties.
Example: a Car is a object, while a method it has could be 'Stop', 'Go', Turn' etc
(actions the object can perform) and a Property of it would be 'speed' (how fast it going', Color etc. If you were to write a program this way it really makes it easier to work with
juanrineytor (10-06-2009)
Haha. I'm the same guy I'm just using this account temporarily, I'm hoping to use my 900th posts for something special. Of course that day may never come since I caused Dave so much trouble. Probably not the smartest move on my part. I'm sorry for nagging him, but that's another story and beyond the point.A question just for you, Didn't you had a same acc with a simillar name ? or did that got banned? or your just a copier? O.o
It's in the first chapter and the 2nd one will tell you later about exact ones.
Why06 again so OOP means that it lets you re-use the code? Oh wow if it's just that. But why "Object Oriented"?
Ok. Here's how may old Java teacher explained it:
If you think about it everything in the world is an object. So instead of programming with mathematical equations and jumps every which way, why not structure our code into logical encapsulations. These are called classes. In nature a class might be birds. Now as you know there are many different types of birds.
A peacock is a bird. A parrot is a bird, an eagle and so on... So what do all these things have in common? Well they all have feathers, beaks, and wings. This is called Inheritence. In OOP class can inherit the traits of a base class. (we would call it a super class in Java) So you see a penguin would inherit wings, feather, and a beak from the bird class. In programming this might be similar to inheriting common functions.
Say you have a bunch of slightly different programs that still use some of the same functions. You could make a class to encapsulate those functions and those same traits will be available to all the off-spring of that class. So you see a penguin may inherit all these traits which keeps us from having to recode the attributes everytime we want a different kind of bird. Say we wanted an eagle. Well eagles can fly while penguins can swim, but they are both birds. So I can just use the bird class to create a new class called eagle only adding the fact that eagles can fly.
As you can see you sing these same features over again can drastically improve development time. Before OOP you might have had to retype the same basic program a hundred times then just typing what has changed about it. Now I'm bet your wondering what an object is?
Well an object is a specific implementation of that class. A class is a blueprint for an object, and the object is the actual thing. That is about as far as I can go into detail right now with out you having any real experience in programming.
Right now you just need to start writing code. Sooner or later you will really come to see how powerful and adaptable objects are.
B1ackAnge1 (10-06-2009),lalakijilp (10-07-2009)
why06jz (10-06-2009)
Well it's the biggest concept to understand. Without this a lot of other neat tricks just aren't possible. I could go into much more detail, but I did not want to make it too long that you wouldn't read it. I already thought I was pushing it.
And thankyou for reading.