Docsity

Introduction to Programming Concepts and Techniques, Summaries of Programming Languages

Toggle sidebar
bg1
Programming
2019
Deepak Bahadur Rokaya (HND / First Semester)
1
Table of Contents
LO1 .................................................................................................................................................. 5
Introduction ................................................................................................................................... 5
Definition of algorithm: ................................................................................................................. 5
Features of algorithm ..................................................................................................................... 5
Advantage of algorithm ................................................................................................................. 5
Disadvantage of algorithm ............................................................................................................. 6
Example of algorithm .................................................................................................................... 6
Flowchart. ..................................................................................................................................... 7
SDLC (Software Development Life Cycle).................................................................................... 7
Waterfall model:............................................................................................................................ 8
Requirements: ........................................................................................................................... 8
System design: .......................................................................................................................... 8
Implementation: ........................................................................................................................ 8
Integration and testing: .............................................................................................................. 8
Deployment of system: .............................................................................................................. 8
Maintenance: ............................................................................................................................. 9
Data Dictionary used in my project inventory management system/ warehouse: ............................ 9
Algorithm of inventory management/ warehouse: ....................................................................... 11
Flowchart: ................................................................................................................................... 12
Conclusion: ................................................................................................................................. 12
LO2 ................................................................................................................................................ 12
Introduction ................................................................................................................................. 12
Programing paradigms: ............................................................................................................... 13
Procedural oriented programing (POP): ....................................................................................... 13
Characteristic of procedural oriented programing (POP): ............................................................. 14
Features of procedural oriented program (POOP): ....................................................................... 14
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44

Partial preview of the text

Download Introduction to Programming Concepts and Techniques and more Summaries Programming Languages in PDF only on Docsity!

  • LO1 Table of Contents
    • Introduction
    • Definition of algorithm:
    • Features of algorithm.....................................................................................................................
    • Advantage of algorithm
    • Disadvantage of algorithm
    • Example of algorithm
    • Flowchart.
    • SDLC (Software Development Life Cycle)....................................................................................
    • Waterfall model:............................................................................................................................
      • Requirements:
      • System design:
      • Implementation:
      • Integration and testing:
      • Deployment of system:
      • Maintenance:
    • Data Dictionary used in my project inventory management system/ warehouse:
    • Algorithm of inventory management/ warehouse:
    • Flowchart:
    • Conclusion:
  • LO2
    • Introduction
    • Programing paradigms:
    • Procedural oriented programing (POP):
    • Characteristic of procedural oriented programing (POP):
    • Features of procedural oriented program (POOP):
  • Demerits of pop:
  • Principal of pop:
    • Basic IO:
    • Example of Basic IO:
  • Conditionals:
    • IF statements:
    • If Else statements:
    • Nested If Else statement:
    • If Else If statements:
  • Control structures:
    • selection control
    • sequential control
    • Array:......................................................................................................................................
    • Array list:
    • Structure:
    • Union:
    • File handling:
  • Object oriented program (OOP):
  • Characteristics of object-oriented program OOP:
  • Limitation of object-oriented program OOP:
  • Principles of object-oriented program OOP:
    • Data encapsulation:
    • Inheritance:
    • Polymorphism:
    • Data abstraction:
  • Event driven programing:
  • Characteristics of event driven program:......................................................................................
    • Function of event driven program:
      • Abstract class:
      • Interface:
      • Generics:
      • Delegates:
      • Events:
    • program: Relationship of procedure-oriented program (POP), object-oriented program (OOP), event driven
    • Conclusion:
  • LO3:
    • Implement basic algorithms in code using an IDE.
    • Conclusion
  • P4
    • Introduction:
    • Debugging:..................................................................................................................................
    • Debugging process:
      • 1: Identify
      • 2: Isolate
      • 3: Fixing..................................................................................................................................
      • 4: Review
    • Debugging facilities found in IDE (visual studio):
      • Tracer:
      • Run mode:...............................................................................................................................
      • Break points:
      • Scale bar:
      • Command window:
  • P5
    • Introduction:
    • Coding:
    • Coding standard:
      • 1.Commenting code:
        1. Indentation:
      • 3.Name Convention:
      • 4.Intelligence:
      • 5.Variable declaration:
    • Conclusion:
  • Bibliography

LO

Provide the definition of what an algorithm is and outline the process in building an application. Introduction Definition of algorithm: According to (Rouse, n.d.) An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem, based on conducting a sequence of specified actions. A computer program can be viewed as an elaborate algorithm. In mathematics and computer science, an algorithm usually means a small procedure that solves a recurrent problem. Algorithm are widely used in all sectors of information and technology (IT) for data processing, calculation and other related operations. Also, it is used to manipulate data in various ways. Features of algorithm The basic features of algorithm are listed below:

  • It should be simple.
  • It should be clear with no ambiguity.
  • It should lead unique solution of the problem.
  • It should involve finite number of steps.
  • It should have the capability to handle some unexpected situations which may arise during the solution of a problem. Advantage of algorithm The advantage of algorithm is listed below:
  • Algorithm is a step-wise written solution of a problem and easily understood by anyone.
  • Algorithm once prepared can be easily converted to program.
  • If a program is written based on an algorithm, it has less error and reediting can be minimized.
  • Algorithm is independent to any programming language, so it is easy to understand for everyone without any programming knowledge.
  • It is easy to debug because every step in an algorithm has its own logical sequence.

Flowchart. SDLC (Software Development Life Cycle). SDLC is a process used by the software industry to design, develop and test high quality software. It is also called as software development process. In software industry development team follow SDLC structure. It is used to check/verify the software whether it is error free or not. It consists of a detailed plan describing how to develop, maintain and replace specific software. The life cycle defines a methodology for improving the quality of software and the overall development process. Following are the most important SDLC model found in software industry:

  • Waterfall model
  • Iterative model
  • Spiral model
  • V-model
  • Big bang model

As per the scenario, I have used waterfall model because it is used mainly in software development in software industry where developer gets an enhanced option of using waterfall model. Waterfall model: Waterfall model is also known as classic life cycle model. In waterfall model each phase most be complete in order to start/begin the next phases and there is no overlapping of phases. Waterfall model is a linear-sequential life cycle model where the progress is seen as flowing towards downwards like a waterfall. Following are the phases of waterfall model. Requirements: It is the first phases of waterfall model in which developer most understand or define what most be design of software and how does the function and purpose of design actually work, should be defined in requirements phases. In requirements phase’s inputs and outputs of the software are studied and marked/plain the software development. System design: In system design the first phases of requirement specification are studied and then the system design of software is prepared. Mainly system design helps in specifying the hardware and the system requirement and helps to define the overall system structure or architecture. Then the structured code to be written in next phases/stage is created now. Implementation: In implementation phases the system design is studied and the inputs from system design, codes are first implemented in small programing called units. Which are going to be integrated in next stages. Then each unit are developed and tested for its functionality known as unit testing. Here in implementation source code, database, user documentation is tested. Integration and testing: In integration and testing the units developed in implementation phases are integrated in system after testing each unit. Then the software design needs to go through constant software testing in order verify that the units of codes are free of error or any flaws. Testing part is done to provide the client/users application free of error or bugs. Deployment of system: After the completion of each functional and non-functional testing of software is done, then the product is deployed over the customer environment or released into the market.

3.Data Dictionary of Supplier table: Column Name Datatype Length Is Primary Key? Is Foreign Key? Allow null? Remarks SupplierID int Yes No No Supplier Name Varchar 50 No No Yes Address Varchar 50 No No Yes Phone Int No No Yes Remarks Varchar 50 No No Yes

  1. Data Dictionary of Purchase table: Column Name Datatype Length Is Primary Key? Is Foreign Key? Allow null? Remarks PurchaseID int Yes No No InvoicenNo int No No Yes SupplierID int No Yes Yes PurchaseDate date No No Yes InvoiceAmount Int No No Yes Remarks Varchar 50 No No Yes 5 .Data Dictionary of Sales table: Column Name Datatype Length Is Primary Key? Is Foreign Key? Allow null? Remarks SalesID int Yes No No InvoicenNo int No No Yes SupplierID int No Yes Yes SalesDate date No No Yes InvoiceAmount Int No No Yes Remarks Varchar 50 No No Yes

6 .Data Dictionary of PurchaseDetails table: Column Name Datatype Length Is Primary Key? Is Foreign Key? Allow null? Remarks PurchaseID int Yes No No ProductID int No No Yes PurchaseDate int No Yes Yes Quantity date No No Yes 7 .Data Dictionary of Sales Details table: Column Name Datatype Length Is Primary Key? Is Foreign Key? Allow null? Remarks PurchaseID int Yes No No ProductID int No No Yes PurchaseDate int No Yes Yes Quantity date No No Yes Algorithm of inventory management/ warehouse: Login form: Step 1: Start the program Step 2: Enter the User Name and password. Step 3: Click login button Step 4 : Verify whether the entered UserName and password are valid? Step 5 : If true, enter into the system and if false, then show the entered username and password is incorrect. Step 6 : Enter the username and password again. Step 7 : stop

Programing paradigms: In simple terms programing paradigms can be said as finding a way or style for programing. Programing paradigms is also known as programing style, programing culture, programing technique. Programing paradigms is a way of classifying of programs with their function and features. “A Paradigm can be thought of as a philosophical or theoretical framework. This framework is then used as the basis of a new way of viewing problems.” (zeus, 2016). For example, it can be function to function calling. Programing paradigms which are used commonly are listed below.

  • Declarative
  • Procedural
  • Structured
  • Imperative
  • Functional
  • Functional level
  • Flow-driven
  • Object-oriented
  • Event-driven
  • Aspect oriented
  • Logic
  • Constraint
  • Array
  • Reflective Procedural oriented programing (POP): Procedural oriented programing is programing procedure based on concept of using procedures and structural programing paradigms. As its names implies procedure oriented is based on step by step procedures to execute like input, output and display. “A procedural language is a type of computer programming language that specifies a series of well-structured steps and procedures within its programming context to compose a program. It contains a systematic order of statements, functions and commands to complete a computational task or program”. (tech, 2014).Mainly pop is used in large scale industry for high maintainability of code and its and for the easiness of solving problem of code and so on. Pop uses common principle it breaks the problem into various small pieces and tries to solve

the problem using function. Due to high maintainability of code, pop is known as structural programing language. FORTRAN, Pascal, C, Basic are some of procedural oriented program. Characteristic of procedural oriented programing (POP):

  • Large problem is divided into small piece.
  • Top to down approach of its design.
  • Data are travel openly from function to function.
  • It functions helps data to transfer from one form to another form.
  • In large programing bringing change is time consuming.
  • It functions shares the global data.
  • It mainly gives priority to processing then data. Features of procedural oriented program (POOP):
  • It has quick compilation of project.
  • Very easy for testing and debugging.
  • Avoid the duplication of code.
  • It is very essential for general purpose programing.
  • Has very high standard for solving problem.
  • Needs very low memory allocation. Demerits of pop:
  • It is not related to real objects.
  • Does not suitable to real world.
  • Takes much more time while compiling because it works on systematic process.
  • No data security as data is transfer to function to function.
  • It needs object-oriented program. Principal of pop: Basic IO: In computing world, I/O is input output devices which helps to communicate between computer processing systems. Basic I/O is function which performs under input, output devices. Mouse, keyboard and joystick are the example of input devices whereas monitor printer is output devices. Through mouse keyboard it takes the inputs and displays the output with the help of screens. In programing data are taken in abstract form, program needs data as the variable name which is input

If Else statements: If we want to choose between two alternative we use the if else statement. It is also known as doubled blocked conditional statement. Example: Nested If Else statement: When an if else statement is present inside the body of another “if” or “else” then this is called nested if else.

Example: If Else If statements: The else-if ladder statement is used to execute one code from multiple conditions. If any condition is true then it execute given set of statements and exits whole if- else ladder. If the condition is false then it will go to the next condition and execute the program. Example: Control structures: In program the main work of control structures is determine the order of program in which statements is executed along with the base of parameters.” A control structure is a block of programming that

Array: An array is a collection of variables of the same data type accessed by indexing. Each item in an array is called an element. All elements in an array are referenced by the name of the array and are stored in a set of consecutive memory slots. Example of Array: There are two types of array they are listed below: Single dimensional array Double dimensional array Array list: Array list is a chaining process of data in one location. It is one of the strongest arrays. It stores as header file in the program and it is mainly used as reference data for programing. It has included memory plank which allow to stored difference data as the information in single location. The main issue of array list is fixed in length so addition of element is less if it is full. So, if the element is removed then also it occupies the space, because it does not gradually shrink Array List Example:

Structure: Structure are the program with single name where data are included by more variables with different data types. Structure helps solve the various complex data and organize the data in very meaning full way. Struct is the keyword which helps to explain/create the structure. These are the elements which must be added while initializing structure variables while compiling data. Defined column must end with semi colon

  • Structure tag name must be declared
  • Its variable name must be reveal
  • Assignment operator (=) must be used