Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Friday at 7:43 PM
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Thursday at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Wednesday at 9:58 PM
Ad icon
Video Content Creator
pramukag
Updated:
Jun 28, 2026
Ad icon
QA Engineer Intern
pramukag
Updated:
Jun 28, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
C++ A to Z
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Ritash9001" data-source="post: 12264620" data-attributes="member: 310548"><p><strong><span style="color: #000077">Programs</span></strong></p><p></p><p> The word program is used in two ways: to describe individual instructions, or source code, created by the programmer, and to describe an entire piece of executable software. This distinction can cause enormous confusion, so we will try to distinguish between the source code on one hand, and the executable on the other.</p><p> <span style="color: #000077"><strong>New Term:</strong></span>A <em>program</em> can be defined as either a set of written instructions created by a programmer or an executable piece of software. Source code can be turned into an executable program in two ways: Interpreters translate the source code into computer instructions, and the computer acts on those instructions immediately. Alternatively, compilers translate source code into a program, which you can run at a later time. While interpreters are easier to work with, most serious programming is done with compilers because compiled code runs much faster. C++ is a compiled language. </p><p><strong><span style="color: #000077">Solving Problems</span></strong></p><p></p><p> The problems programmers are asked to solve have been changing. Twenty years ago, programs were created to manage large amounts of raw data. The people writing the code and the people using the program were all computer professionals. Today, computers are in use by far more people, and most know very little about how computers and programs work. Computers are tools used by people who are more interested in solving their business problems than struggling with the computer.</p><p> Ironically, in order to become easier to use for this new audience, programs have become far more sophisticated. Gone are the days when users typed in cryptic commands at esoteric prompts, only to see a stream of raw data. Today's programs use sophisticated "user-friendly interfaces," involving multiple windows, menus, dialog boxes, and the myriad of metaphors with which we've all become familiar. The programs written to support this new approach are far more complex than those written just ten years ago.</p><p> As programming requirements have changed, both languages and the techniques used for writing programs have evolved. While the complete history is fascinating, this book will focus on the transformation from procedural programming to object-oriented programming. </p><p><strong><span style="color: #000077">Procedural, Structured, and Object-Oriented Programming</span></strong></p><p></p><p> Until recently, programs were thought of as a series of procedures that acted upon data. A procedure, or function, is a set of specific instructions executed one after the other. The data was quite separate from the procedures, and the trick in programming was to keep track of which functions called which other functions, and what data was changed. To make sense of this potentially confusing situation, structured programming was created.</p><p> The principle idea behind structured programming is as simple as the idea of divide and conquer. A computer program can be thought of as consisting of a set of tasks. Any task that is too complex to be described simply would be broken down into a set of smaller component tasks, until the tasks were sufficiently small and self-contained enough that they were easily understood.</p><p> As an example, computing the average salary of every employee of a company is a rather complex task. You can, however, break it down into these subtasks: </p><p><strong>1.</strong> Find out what each person earns.</p><p> </p><p> <strong>2.</strong> Count how many people you have.</p><p> </p><p> <strong>3.</strong> Total all the salaries.</p><p> </p><p> <strong>4.</strong> Divide the total by the number of people you have. Totaling the salaries can be broken down into </p><p><strong>1.</strong> Get each employee's record.</p><p> <strong></strong></p><p><strong> 2.</strong> Access the salary.</p><p> <strong></strong></p><p><strong> 3.</strong> Add the salary to the running total.</p><p> <strong></strong></p><p><strong> 4.</strong> Get the next employee's record. In turn, obtaining each employee's record can be broken down into </p><p><strong>1.</strong> Open the file of employees.</p><p> <strong></strong></p><p><strong> 2.</strong> Go to the correct record.</p><p> <strong></strong></p><p><strong> 3.</strong> Read the data from disk. Structured programming remains an enormously successful approach for dealing with complex problems. By the late 1980s, however, some of the deficiencies of structured programing had became all too clear.</p><p> First, it is natural to think of your data (employee records, for example) and what you can do with your data (sort, edit, and so on) as related ideas.</p><p> Second, programmers found themselves constantly reinventing new solutions to old problems. This is often called "reinventing the wheel," and is the opposite of reusability. The idea behind reusability is to build components that have known properties, and then to be able to plug them into your program as you need them. This is modeled after the hardware world--when an engineer needs a new transistor, she doesn't usually invent one, she goes to the big bin of transistors and finds one that works the way she needs it to, or perhaps modifies it. There was no similar option for a software engineer.</p><p> <span style="color: #000077"><strong>New Term:</strong></span>The way we are now using computers--with menus and buttons and windows--fosters a more interactive, event-driven approach to computer programming. <em>Event-driven</em> means that an event happens--the user presses a button or chooses from a menu--and the program must respond. Programs are becoming increasingly interactive, and it has became important to design for that kind of functionality. Old-fashioned programs forced the user to proceed step-by-step through a series of screens. Modern event-driven programs present all the choices at once and respond to the user's actions.</p><p> Object-oriented programming attempts to respond to these needs, providing techniques for managing enormous complexity, achieving reuse of software components, and coupling data with the tasks that manipulate that data.</p><p> The essence of object-oriented programming is to treat data and the procedures that act upon the data as a single "object"--a self-contained entity with an identity and certain characteristics of its own.</p></blockquote><p></p>
[QUOTE="Ritash9001, post: 12264620, member: 310548"] [B][COLOR=#000077]Programs[/COLOR][/B] The word program is used in two ways: to describe individual instructions, or source code, created by the programmer, and to describe an entire piece of executable software. This distinction can cause enormous confusion, so we will try to distinguish between the source code on one hand, and the executable on the other. [COLOR=#000077][B]New Term:[/B][/COLOR]A [I]program[/I] can be defined as either a set of written instructions created by a programmer or an executable piece of software. Source code can be turned into an executable program in two ways: Interpreters translate the source code into computer instructions, and the computer acts on those instructions immediately. Alternatively, compilers translate source code into a program, which you can run at a later time. While interpreters are easier to work with, most serious programming is done with compilers because compiled code runs much faster. C++ is a compiled language. [B][COLOR=#000077]Solving Problems[/COLOR][/B] The problems programmers are asked to solve have been changing. Twenty years ago, programs were created to manage large amounts of raw data. The people writing the code and the people using the program were all computer professionals. Today, computers are in use by far more people, and most know very little about how computers and programs work. Computers are tools used by people who are more interested in solving their business problems than struggling with the computer. Ironically, in order to become easier to use for this new audience, programs have become far more sophisticated. Gone are the days when users typed in cryptic commands at esoteric prompts, only to see a stream of raw data. Today's programs use sophisticated "user-friendly interfaces," involving multiple windows, menus, dialog boxes, and the myriad of metaphors with which we've all become familiar. The programs written to support this new approach are far more complex than those written just ten years ago. As programming requirements have changed, both languages and the techniques used for writing programs have evolved. While the complete history is fascinating, this book will focus on the transformation from procedural programming to object-oriented programming. [B][COLOR=#000077]Procedural, Structured, and Object-Oriented Programming[/COLOR][/B] Until recently, programs were thought of as a series of procedures that acted upon data. A procedure, or function, is a set of specific instructions executed one after the other. The data was quite separate from the procedures, and the trick in programming was to keep track of which functions called which other functions, and what data was changed. To make sense of this potentially confusing situation, structured programming was created. The principle idea behind structured programming is as simple as the idea of divide and conquer. A computer program can be thought of as consisting of a set of tasks. Any task that is too complex to be described simply would be broken down into a set of smaller component tasks, until the tasks were sufficiently small and self-contained enough that they were easily understood. As an example, computing the average salary of every employee of a company is a rather complex task. You can, however, break it down into these subtasks: [B]1.[/B] Find out what each person earns. [B]2.[/B] Count how many people you have. [B]3.[/B] Total all the salaries. [B]4.[/B] Divide the total by the number of people you have. Totaling the salaries can be broken down into [B]1.[/B] Get each employee's record. [B] 2.[/B] Access the salary. [B] 3.[/B] Add the salary to the running total. [B] 4.[/B] Get the next employee's record. In turn, obtaining each employee's record can be broken down into [B]1.[/B] Open the file of employees. [B] 2.[/B] Go to the correct record. [B] 3.[/B] Read the data from disk. Structured programming remains an enormously successful approach for dealing with complex problems. By the late 1980s, however, some of the deficiencies of structured programing had became all too clear. First, it is natural to think of your data (employee records, for example) and what you can do with your data (sort, edit, and so on) as related ideas. Second, programmers found themselves constantly reinventing new solutions to old problems. This is often called "reinventing the wheel," and is the opposite of reusability. The idea behind reusability is to build components that have known properties, and then to be able to plug them into your program as you need them. This is modeled after the hardware world--when an engineer needs a new transistor, she doesn't usually invent one, she goes to the big bin of transistors and finds one that works the way she needs it to, or perhaps modifies it. There was no similar option for a software engineer. [COLOR=#000077][B]New Term:[/B][/COLOR]The way we are now using computers--with menus and buttons and windows--fosters a more interactive, event-driven approach to computer programming. [I]Event-driven[/I] means that an event happens--the user presses a button or chooses from a menu--and the program must respond. Programs are becoming increasingly interactive, and it has became important to design for that kind of functionality. Old-fashioned programs forced the user to proceed step-by-step through a series of screens. Modern event-driven programs present all the choices at once and respond to the user's actions. Object-oriented programming attempts to respond to these needs, providing techniques for managing enormous complexity, achieving reuse of software components, and coupling data with the tasks that manipulate that data. The essence of object-oriented programming is to treat data and the procedures that act upon the data as a single "object"--a self-contained entity with an identity and certain characteristics of its own. [/QUOTE]
Insert quotes…
Verification
Dahaya deken beduwama keeyada?
Post reply
Top
Bottom