Steps in programming
Before starting programming, understand the problem clearly.
Once you start the problem, half of the work is done.
Always remember, when you are writing a program you are expecting the program to perform an operation and give you the result in some format.
Then you can use some methods like flowchart, algorithms to express in terms of logic involved in the problem.
Flowchart – pictorial representation with symbols for input, output, actions.
Algorithm- sequence of operations to be performed.
Then, you can move to the designing.
For designing part we have UML (Unified Modelling Language) diagrams.
It is more operation oriented. What type of coding technique you are going to use to achieve your programming.
Take example of OOPS concept; it is an approach to solve a problem.
OOPS mainly concentrating on how you are separating the main problem into small units and what methods you are using to link them together.
Here we are using Object as small unit of big problem.
Let me explain with an example
Take Library Management Software,
Ask some questions yourself
What is the final usage of this software?
-To manage the book lists
-Provide access to the used
-Provide special access to the Librarian
-Enter the book details
-Maintain the book movement from library to the user.
How many users involved?
Librarian, who manage/update the book details
User, who search for the book details, get the books online
Is anybody involved other than them?
So, users are providing inputs.
Who is doing the operation of managing the book?
Library Management Software (LMS)
So, what are the operations of LMS?
-Manage the book detail database based on the user input
-Update the book details for new books
-Delete any missed/stolen books
-Print the list
So simple …. Right.
Then comes the design part
We have the users and the software.
You can transform this into an OOPS concept.
Here I have one software main module called LMS.
So I can have one class called CLMS.
Suppose if you prefer to have a separate module to manage the Book database then you have one more class call cBookManager.
So you can make these two classes to communicate in a certain way.
In OOPS, you are having inheritance (Remember father-son relationship)
So what I can do with this concept to solve this problem?
This way, you can divide the main software into sub modules based on the complexity and apply the concepts of OOPS to create the complete picture of software.
Three steps to programming using OOPS
For that, you have to know the basic concept of OOPS (that is very simple you can learn it in one day)
Learn to divide the complex problem into small modules.(most times it comes by experience, so don’t worry)
Apply necessary link between the sub modules
Above all, understand the problem clearly.
You complete the reading of the document. Read Again and think about how you design the Library Management Software.
You are a programmer.
Best Of Luck