Skip to main content

What are program design models? How do they work?

Program Design Model 

Programmers use many instructions in writing programs. Solve the problem by arranging these instructions logically. Long after the program is written, it is often difficult for the programmer to understand his own written program. Therefore, various programming approaches are currently in use for writing programs in order to increase the comprehensibility of the program. Below is a brief description of them:

Structured Programming: A set of instructions used to solve a problem is called a program. If the problem to be programmed is very complex then the number of instructions used in the program is very high. When the program gets big, it becomes buggy and runs into various problems. In these cases, a structured program has to be used. Statements used in a structured program perform their own tasks from within their respective classes. Return control to the main body by executing operations from the main body of the program using various class statements. Structured programs should be periodic and decisive. The basic idea of ā€‹ā€‹a structured program is to divide a large program into smaller parts, each of which is called a sub-program. Structured programs have a main program to control the sub-programs used. Examples: Qbasic, Fortran, Pascal etc.

Visual Programming: With the development of computers, the trend of working on Graphical User Interfaces is increasing among users. Nowadays, all kinds of application programs, starting from operating systems, are now image-based. Instead of colour-based monotonous interfaces, there is a growing demand for interfaces with different colour images. Having the opportunity to use visual cues in the work environment greatly benefits the user. Considering these aspects, currently, programming languages ā€‹ā€‹are being improved. It also creates a convenient interface for the user along with the functions of the program. Presently, visual programming languages ā€‹ā€‹such as Visual Basic, Visual C, Visual Fox Pro, etc. have brought the facility of creating user interfaces with scrollbars, dialogue boxes, text boxes, etc.

Object-Oriented Programming: All program languages ā€‹ā€‹that create a variable by combining code and data are called object-oriented programming languages. Usually, the combined form of code and data is called an object. Once the code and data are combined, the object acquires its own identity. Then the user doesn't need to know how the object works. Objects perform tasks on their own if the user provides appropriate data. Any object can be stored in memory for use in another program. In short, an object-oriented program is a collection of objects that each have their own characteristics.

Object Oriented Programming is a visual programming methodology. Generally, the control of the program is entrusted to the user. Program execution is done by working together with the core coding of the program and the user controls. Before the advent of visual programming, user controls were colour-based. Visual programming provides an interface with several facilities to the user. Like check box, command button etc. Basically, a computer user works with the help of these. In addition to the currently provided controls, modern programs also offer the user the ability to create their own controls. Like C++, Visual C++, Java etc. The characteristics of object-oriented programs are --

(1) polymorphism

(2) inheritance and 

(3) encapsulation.

Event-Driven Programming

Event-Driven Programming uses a graphical interface in programming. In this type of programming, when the user instructs the computer with the help of a keyboard or mouse in various parts with the help of a graphical interface, it is called an event. When a command button is clicked by the mouse, its associated actions are performed. These functions are called procedures. Event Dryden like Procedural Programming


Characteristics of a Standard Program:

Programming is required to perform tasks that cannot be performed using conventional application software. A programmer has to have a clear and practical understanding of the programming language or it is impossible to write ideal programs. Also, a programmer needs to be well aware of the purpose of programming. An ideal program should have the following features.


(1) The program should be as short as possible.

(2) Variables and constants used in the program must be declared at the beginning of the program.

(3) Excessive loops in the program should be avoided.

(4) Flowcharts and algorithms used for the program should be extremely simple.

(5) Variable names used in programs should be meaningful.

(6) Appropriate programming language should be selected for the particular task.

(7) Selecting the appropriate algorithm for a particular task.


'C' Programming Language: C is a type of high-level language. It is a structured programming language. US Bell Labs programmer Dennis Ritchie created the C programming language in 1970. At first, the C programming language had to be used in the Unix operating system for the PDP-11 computer. The Unix operating system was later rewritten by C. Currently, C programming language is used to control various computers and various operating systems.

Primary Concept Due to the popularity of C, various software companies develop C compilers. Some common compilers are Turbo C, Borland C, Microsoft C etc. There are minor differences between these versions of C. With few exceptions, programs written in one version can be executed in another version. More than 90 per cent of compilers and operating systems in use today are written in C language. The use of a function called Main is essential in C programs. Program execution starts from this function.


The process to start a C program: Most C compilers have their own advanced source editor, where C source files can be created easily and beautifully. The Turbo C compiler has an integrated environment called the Turbo C IDE (Integrated Development Environment). To run the IDE, the TC.Exe file is run from the BIN subdirectory of the C compiler directory. Then select New from the File menu to write the program. Whether a new file is opened as NONAME00.CPP or NONAME00.C is specified in the Environment submenu Editor option of the compiler's options menu. This option can be changed if necessary.

C programming language has the following features:

1. In the C programming language header file is mentioned at the beginning of every program.

2. The main() function should be written after the header file.

3. Instructions used by the program must be enclosed in second parentheses ( ).

4. Comment line used by the program should be given // at the beginning. If the comment is multiple lines. /* and */ must be enclosed within these symbols.

5. Statements in the C program language must be in English lowercase.

6. It has the convenience of using various library functions.

7. C programming language is not machine dependent.


Program Compile:

After creating the source program, its execution has to be done in two steps; Namely:

(1) (.obj) file is created when the program is compiled (Alt+F9).

(2) When the program is executed (Ctrl+F9) (.exe) file is created.

* Monitoring program results

Press F7 to trace the source program step by step. So press Ctrl+F2 to stop monitoring the program.

Comments

Popular posts from this blog

The Importance of SEO Services for Your Business: A Guide by Best SEO Company Primelis

Best SEO Company Primelis Are you looking for the best SEO company to help your business grow online? Look no further than Primelis ā€“ the leading provider of SEO services for businesses of all sizes. Why Choose Primelis? At Primelis, we understand that every business has unique needs and goals when it comes to their online presence. That's why we offer customized SEO solutions tailored to your specific needs. Our team of experts has years of experience working in the SEO industry, and we stay up-to-date with the latest trends and best practices to ensure that your website is optimized for success. We also offer a range of other digital marketing services to help your business succeed online, from PPC advertising to social media marketing and more. Our SEO Services Our SEO services are designed to help your website rank higher in search engine results pages, driving more traffic and leads to your business. Some of the SEO services we offer include: Keyword Research We'll help yo...

Unlocking Online Success: Why Justoctane SEO Services are the Best Choice for Businesses in Boca Raton, Florida.

Best Justoctane SEO Services Boca Raton in Florida Are you looking for the best SEO services in Boca Raton, Florida? Look no further than Justoctane SEO services. As a leading provider of SEO services, Justoctane has helped numerous businesses in the Boca Raton area achieve top rankings on search engine results pages. In this blog post, we will explore why Justoctane is the best choice for SEO services in Boca Raton. Experience and Expertise Justoctane has a team of experienced and highly skilled SEO professionals who have a deep understanding of search engine algorithms and the latest SEO techniques. Their expertise allows them to create customized SEO strategies that are tailored to the specific needs of each client. The Justoctane team has worked with businesses in various industries and niches, providing them with a wealth of knowledge and experience to draw from when creating effective SEO strategies. Comprehensive Services Justoctane offers a wide range of SEO services, incl...

Malicious regulation of power supply and its prevention

Control of power supply damage and its prevention Computers can have various problems related to power supply. Irregular supply of electricity is one of the problems related to computer power supply. Besides, not having proper voltage, frequent power supply, power return in shortest time interval, lack of earthing, fault in power supply unit, heating of internal parts of power supply unit, not getting proper voltage and signal at output power supply unit switch Not working mode etc. are some of the harmful regulators of power supply. All these problems and solutions are described below -- (a) Voltage problem : Damage to computers and other electrical appliances due to high voltage is a regular occurrence in our country. A voltage stabilizer can be used to avoid this condition. Many times when the voltage is much lower than required, any electrical appliance used in the home cannot be operated. In this case, the computer should be turned off. (b) Sudden power outage : Load shedding is a...