anonymous
  • anonymous
what is class declaration and defination in object oriented programming
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
I think you could start by reading more generally about object oriented programming. You can use the following link: http://en.wikipedia.org/wiki/Object-oriented_programming
anonymous
  • anonymous
This might be helpful as well: http://docs.oracle.com/javase/tutorial/java/concepts/
anonymous
  • anonymous
Finally, if you fancy reading: http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep Apologies for the multiple posts... just looking around and posting!

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
You can also check out this pdf. its all about oop (object oriented language) http://www.mathworks.com/help/pdf_doc/matlab/matlab_oop.pdf
anonymous
  • anonymous
In general, declaration instructs compiler that such a class(in general type) exists. Definition allocates memory when an object is created using the class. ex: int i; // this is both declaration and definition Person P; // Assume Person as class, then this is also declaration and definition. extern int i; // just a declaration. The variable is defined elsewhere extern Person P; // just a declaration. The variable is defined elsewhere Hope this helps.
anonymous
  • anonymous
@itsArun - why is int i both declaration and definition whereas extern int i just a declaration?
anonymous
  • anonymous
what language are you talkig about python or java
anonymous
  • anonymous
Java
anonymous
  • anonymous
extern is a C/C++ keyword. @istArun I think you have confused the declaration, the definition and the instantiation of classes and what you wrote is not particularly helpful, rather than confusing!
anonymous
  • anonymous
On a side note, don't confuse primitive types with classes!
anonymous
  • anonymous
so simple a class is a couples of objects , so class al last have one object to start over and called as a class . the definition in programming is simple start write public class simpleclass { simpleclass(){}}
anonymous
  • anonymous
huh class don't have premitive type it has others definition or others type like protection type , like an abstract class or an interface class , but premetives is just for variables
anonymous
  • anonymous
hmm
anonymous
  • anonymous
In java: Definition of class: public class Bicycle { // the Bicycle class has // three fields public int cadence; public int gear; public int speed; // the Bicycle class has // one constructor public Bicycle(int startCadence, int startSpeed, int startGear) { gear = startGear; cadence = startCadence; speed = startSpeed; } // the Bicycle class has // four methods public void setCadence(int newValue) { cadence = newValue; } public void setGear(int newValue) { gear = newValue; } public void applyBrake(int decrement) { speed -= decrement; } public void speedUp(int increment) { speed += increment; } } Declaration of the above class: Bicycle myBicycle; Instantiation of the above class: Bicycle myBicycle = new Bicycle(1, 0, 1); // You pass the required parameters to the constructor. It can be done in two steps but it's a matter of style: Bicycle myBicycle; myBicycle = new Bicycle(1, 0, 1); Hope that makes things clear!
anonymous
  • anonymous
Chris2332 why you used to write that Bicycle myBicycle; myBicycle = new Bicycle(1, 0, 1); you can just write Bicycle myBicycle = new Bicycle(1, 0, 1); and her you will win a line
anonymous
  • anonymous
Just said that it can be done in two steps if you want and it is just a matter of style! One line is perfectly fine!
anonymous
  • anonymous
hh Chris you right i think you have also an advancer java and that's good i have done that's ps just in case you will passed some certificat as OCJP bcz that line will matter hh
anonymous
  • anonymous
So how can I program a bible in Java Programming Language
anonymous
  • anonymous
bthemesandtricks can you be more clear ?!!!
anonymous
  • anonymous
Like a bible software
anonymous
  • anonymous
i didn't get it yet ? explain plz tell more detaills
anonymous
  • anonymous
I am making an attempt to answer this question though being a beginner myself. REQUEST ALL EXPERTS here to correct immediately if it is wrong. My explanation may not use technical jargons as I am very new to programming. Class can be compared to a template whereby you define basic features/attributes for any Object you wish to create from it in the future. Thus Class definition is defining what all basic features/functionality you wish to have in your future object derived from it. Something like a blueprint from which you will create real thing going forward. For e.g. Class Automobile can have attributes like Colour, Door, Engine, etc and Functions like "StartTheCar"", "ReverseTheCar", "StopTheCar" etc which defines what all the automobile can do. Class Declaration is using the template you just defined. i.e. declaring an object of class Automobile. So this could be any car such as Merc, BMW, or XYZ ...
anonymous
  • anonymous
Hey billel I want a java code to be able to write a bible software
anonymous
  • anonymous
you totaly right in basic understanding yes that's the general describing not as philosophycs but you right congradulation :)
anonymous
  • anonymous
ok i will help you but what you mean by a bibl softwar ; do you mean by that a simple oftwar guid you to others softwar like a small refferance for web sites ?
anonymous
  • anonymous
@bthemesandtricks I think you are not in the correct forum to be asking for java code. You could try http://www.coderanch.com/ and similar websites!
anonymous
  • anonymous
Thanks Man
anonymous
  • anonymous
gd lctal
anonymous
  • anonymous
kk
anonymous
  • anonymous
@bthemesandtricks if ( you need help == true ) System .out .println(" we will help you anyway");

Looking for something else?

Not the answer you are looking for? Search for more explanations.