what is the point of developing different classes ?

my question is why to develop many classes and import between them while we can produce objects as much as we can in one class ?Message was edited by: scrolldown
[182 byte] By [scrolldowna] at [2007-11-26 17:14:59]
# 1
classes are based on set of similar functions and attributes that they perform. It greatly improves the managability and readability of a project.
@tifa at 2007-7-8 23:42:59 > top of Java-index,Java Essentials,New To Java...
# 2
let's see, we have a program to recieve data input and get different calculations on them , should we divide the program to different calsses in regerd to each different operation of calculation ?
scrolldowna at 2007-7-8 23:42:59 > top of Java-index,Java Essentials,New To Java...
# 3

the monolithic - everything in one place - application is a nightmare to maintain, basically. imagine having to work out and trace a million lines of code, where they all lead and what they do, all in one source file. a nightmare. modularising software allows us to work on small pieces of the problem at once, and, done properly, to change individual modules without affecting others. it's not limited to software, either. look inside your PC. there isn't just one single chip that processes instructions, accesses memory, accesses drives, manipulates the screen, outputs sound and communicates over the network. there are modules that specialize in one of those things. imagine if everything was done by one chip, and then the manufacturer realises they made a mistake in the memory part of the chip. you'd have to replace the whole thing. now imagine a piece of unmodular software, and there's a bug in one small place. you now have to replace the entire thing

it might not seem so at the moment, but when you come to write larger applications, you'll see the benefits of separation

georgemca at 2007-7-8 23:42:59 > top of Java-index,Java Essentials,New To Java...