• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is the real purpose of class

 
Ranch Hand
Posts: 38
Oracle Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is the real purpose of class is to make use of object constructors? or i can hide my methods or at least put my methods there for the sake of Organized methods ill make classes but i wont make use of its constructors. i know i can put it there but is it a good practice?



if this is not a good practice can you teach me how to at least have an organized methods because whenever a professor asks us to make a program it sometimes tend to be so long and bulky
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess your question really is more about object-oriented design/programming than it is about classes in Java.
You may want to start by reading this Wikipedia article on object-oriented programming, especially the section called "Fundamental features and concepts".
That should point you to a closely related article on classes.

 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joseph,

Please see my private message to you regarding your post.

One of the best ways for you to learn is to practice, practice, practice. In order to practice, you need to read up on the basics. I have referred you to the Java Tutorials page before. Here is the link again: http://docs.oracle.com/javase/tutorial/java/concepts/ . It explains some of the basic concepts, including what a class is used for.

If your professor does not teach you how to organize your programs properly, then it is up to you to learn how good developers actually do it to make their lives and the lives of those who will eventually maintain their programs better. There are so many articles on the internet on good programming practices, I don't even know where to start. But they're out there if you SearchFirst. My advice is to search for articles by authors like Robert C. Martin, Joshua Bloch, Kent Beck, Martin Fowler, Alistair Cockburn, Craig Larman, Neal Ford, go out on http://www.InfoQ.com, and for something local there in the PH, find Orange & Bronze Software Labs on some of the popular social networks.
 
joseph dela cruz
Ranch Hand
Posts: 38
Oracle Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the reason why i did not look on that site is because i know the links give longer reads than tutorials point but anyway since you persist ill read it maybe its a good read after all
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

joseph dela cruz wrote:the reason why i did not look on that site is because i know the links give longer reads than tutorials point but anyway since you persist ill read it maybe its a good read after all


Please do. I tried Julinu's link and it was fine.

You might also want to look at the SearchFirst page here.

Winston
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic