Docsity

BTEC Level-4: Computer Programming Assignment, Study notes of Computer science

Toggle sidebar
bg1
Programming|2020
Table of Contents
Part 1......................................................................................................................................................6
Introduction....................................................................................................................................................6
Algorithm:.......................................................................................................................................................7
Advantages of Algorithm:...........................................................................................................................7
Disadvantages of Algorithm:.......................................................................................................................7
Characteristics of an Algorithm:.................................................................................................................7
Example of an algorithm............................................................................................................................ 8
Outline process...............................................................................................................................................8
Waterfall model............................................................................................................................................10
Advantages............................................................................................................................................... 11
Disadvantages...........................................................................................................................................11
Agile model................................................................................................................................................... 12
Advantages............................................................................................................................................... 12
Disadvantages...........................................................................................................................................12
IDE (Integrated Development Environment)................................................................................................13
Microsoft’s Visual Studio.......................................................................................................................... 13
Programming language.............................................................................................................................14
Platform environment.............................................................................................................................. 14
Design Architecture of Application (LMS).....................................................................................................15
Data Dictionary............................................................................................................................................. 23
Algorithm and flowchart of LMS.........................................................................................................25
Algorithm and flowchart for login form........................................................................................................25
Algorithm and flowchart to save student detail...........................................................................................26
Algorithm and flowchart to update student detail....................................................................................... 27
Algorithm and flowchart to delete student detail........................................................................................28
Code execution process................................................................................................................................ 29
Source code:............................................................................................................................................. 30
Preprocessor:............................................................................................................................................30
Complier:.................................................................................................................................................. 30
Assembler:................................................................................................................................................ 30
Linker:....................................................................................................................................................... 31
Suresh Shrestha|BTEC HND 1
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
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download BTEC Level-4: Computer Programming Assignment and more Study notes Computer science in PDF only on Docsity!

Table of Contents

  • Part 1......................................................................................................................................................
    • Introduction....................................................................................................................................................
    • Algorithm:.......................................................................................................................................................
      • Advantages of Algorithm:...........................................................................................................................
      • Disadvantages of Algorithm:.......................................................................................................................
      • Characteristics of an Algorithm:.................................................................................................................
        • Example of an algorithm............................................................................................................................
    • Outline process...............................................................................................................................................
    • Waterfall model............................................................................................................................................
      • Advantages...............................................................................................................................................
      • Disadvantages...........................................................................................................................................
    • Agile model...................................................................................................................................................
      • Advantages...............................................................................................................................................
      • Disadvantages...........................................................................................................................................
    • IDE (Integrated Development Environment)................................................................................................
      • Microsoft’s Visual Studio..........................................................................................................................
      • Programming language.............................................................................................................................
      • Platform environment..............................................................................................................................
    • Design Architecture of Application (LMS).....................................................................................................
    • Data Dictionary.............................................................................................................................................
  • Algorithm and flowchart of LMS.........................................................................................................
    • Algorithm and flowchart for login form........................................................................................................
    • Algorithm and flowchart to save student detail...........................................................................................
    • Algorithm and flowchart to update student detail.......................................................................................
    • Algorithm and flowchart to delete student detail........................................................................................
    • Code execution process................................................................................................................................
      • Source code:.............................................................................................................................................
      • Preprocessor:............................................................................................................................................
      • Complier:..................................................................................................................................................
      • Assembler:................................................................................................................................................
      • Linker:.......................................................................................................................................................
      • Loader:......................................................................................................................................................
      • Memory:...................................................................................................................................................
    • Example of C programming in code block....................................................................................................
  • About C program.................................................................................................................................. - Sample program.......................................................................................................................................
    • Relation Between Algorithm and Code variant.............................................................................................
    • Conclusion....................................................................................................................................................
    • Presentation.................................................................................................................................................
  • Part 2....................................................................................................................................................
    • Introduction..................................................................................................................................................
    • Programming paradigms..............................................................................................................................
      • Procedural-oriented Programming (POP).................................................................................................
      • Characteristics of Procedural Programming.............................................................................................
      • Advantage of Procedural Programming....................................................................................................
      • Limitation of Procedural Programming.....................................................................................................
      • Coding using Procedural Language...........................................................................................................
      • IF Else statement......................................................................................................................................
      • Else IF statement......................................................................................................................................
      • Jump control statement...........................................................................................................................
    • Break.............................................................................................................................................................
      • Break;........................................................................................................................................................
      • Continue...................................................................................................................................................
      • Go to.........................................................................................................................................................
      • Return.......................................................................................................................................................
    • Loop or repetition.........................................................................................................................................
      • Advantage of looping................................................................................................................................
    • While loop....................................................................................................................................................
    • For loop........................................................................................................................................................
    • Do while loop................................................................................................................................................
      • Array.........................................................................................................................................................
    • Initializing an Array.......................................................................................................................................
    • Array in detail:..............................................................................................................................................
      • Multi-dimensional array...........................................................................................................................
      • Passing array to function..........................................................................................................................
    • Return array from function.......................................................................................................................
    • Pointer to an array....................................................................................................................................
    • Structure...................................................................................................................................................
    • Pointer......................................................................................................................................................
  • Address of pointer in C.................................................................................................................................
  • Pointer variable............................................................................................................................................
    • String........................................................................................................................................................
      • Function...................................................................................................................................................
    • File handling.............................................................................................................................................
  • Object Oriented Programming (OOP)...........................................................................................................
  • Features of Object-Oriented Programming..................................................................................................
    • Inheritance...............................................................................................................................................
  • Single-level inheritance................................................................................................................................
  • Multi-level inheritance.................................................................................................................................
    • Class and object........................................................................................................................................
    • Data encapsulation...................................................................................................................................
    • Abstraction...............................................................................................................................................
    • Polymorphism...........................................................................................................................................
  • Static polymorphisms:..................................................................................................................................
  • Dynamic polymorphism:...............................................................................................................................
  • Event driven program...................................................................................................................................
    • Features of event driven program............................................................................................................
    • Service orientated....................................................................................................................................
    • Time driven...............................................................................................................................................
    • Event handlers..........................................................................................................................................
    • Trigger functions.......................................................................................................................................
  • Events (Mouse, keyboard and user interface)..............................................................................................
  • Advantages of event driving programming...................................................................................................
  • Disadvantages of event driving programming..............................................................................................
  • Relationship between procedural, object oriented and event driven programming....................................
  • IDE (Integrated Development Environment)................................................................................................
    • Benefits of IDE..........................................................................................................................................
    • Tools available in IDE................................................................................................................................
  • Library in IDE.................................................................................................................................................
    • Automation tools..........................................................................................................................................
    • .Net Connectivity (ADODB)...........................................................................................................................
    • Evaluating source code of application..........................................................................................................
    • Building the program using Procedural Oriented Program (POP).................................................................
    • Building the program using Object Oriented Program (OOP).......................................................................
    • Building the program using Event Driven Program (EDP).............................................................................
    • Conclusion....................................................................................................................................................
  • Part 3....................................................................................................................................................
    • Introduction..................................................................................................................................................
    • Login form design and source code..............................................................................................................
    • Dashboard form design and source code.....................................................................................................
    • Design and source code for Modify Student.................................................................................................
    • View Students design and source code........................................................................................................
    • Design and Source code to modify books...................................................................................................
    • View book design and source code.............................................................................................................
    • Issue book design and source code............................................................................................................
    • Registration design and source code..........................................................................................................
    • View user design and source code..............................................................................................................
    • Design and source code of return book......................................................................................................
    • Design and source code of change password.............................................................................................
    • Design and source code of report by date..................................................................................................
    • Design and source code of report by book.................................................................................................
    • IDE to manage development process.........................................................................................................
      • Advantages of IDE...................................................................................................................................
      • Disadvantages of IDE..............................................................................................................................
    • IDE’s help in development of application...................................................................................................
      • Debugging...............................................................................................................................................
      • Solution Explorer....................................................................................................................................
      • Auto complete........................................................................................................................................
      • Toolbox...................................................................................................................................................
      • Code editor.............................................................................................................................................
      • Auto complete........................................................................................................................................
        • Bracket matching...................................................................................................................................
      • Compiler.................................................................................................................................................
  • Comparison of using IDE with not using.....................................................................................................
    • Debug.....................................................................................................................................................
    • Documentation.......................................................................................................................................
    • Library.....................................................................................................................................................
    • Build automatic.......................................................................................................................................
    • Debugging...............................................................................................................................................
  • Process of debugging..................................................................................................................................
    • Locate error............................................................................................................................................
    • Design error repair..................................................................................................................................
    • Fix the error and retest the program......................................................................................................
  • Debugging in IDE (Visual Studio).................................................................................................................
  • Coding Standard.........................................................................................................................................
    • Advantages of coding standard..............................................................................................................
  • Coding Convention used for LMS................................................................................................................
    • Indentation.............................................................................................................................................
  • Commenting the code................................................................................................................................
    • Line Comment........................................................................................................................................
    • Block Comment......................................................................................................................................
  • Variable Declaration...................................................................................................................................
  • Naming Convention....................................................................................................................................
    • Camel case:.............................................................................................................................................
    • Pascal case:.............................................................................................................................................
  • Necessity of coding standard in team and for individual............................................................................
  • Debugging process evaluation....................................................................................................................
  • Debugging process......................................................................................................................................
    • Locate error............................................................................................................................................
    • Design error repair:................................................................................................................................
    • Fix the error and retest the program:.....................................................................................................
  • Breakpoint..................................................................................................................................................
    • Steps to implement the breakpoint........................................................................................................
  • Coding standard.......................................................................................................................................... - Pros of coding standard.........................................................................................................................
    • For developer.........................................................................................................................................
    • For team.................................................................................................................................................

desktop application of library. I have used Visual Studio IDE to develop the application and this IDE

has many facilities.

Algorithm:

An algorithm is a finite set of instructions to solve a problem. It is also known as step by step

procedure. As for example of an algorithm cooking recipe can be good example because it says what

must be done in steps as it takes input as ingredients and gives an output as complete dish. An

algorithm is usually used for data processing, calculation also computer and mathematical

operations.

An algorithm is language-independent, i.e. they are only simple instruction which can be in any

language and thus the output will be always same.

Advantages of Algorithm:

 It is a step-by-step guide that is very easy to understand.

 An algorithm uses definite procedure.

 Algorithms are more flexible.

 The problem is broken in smaller pieces which helps to convert it into an actual program easily.

 Every step in an algorithm has its own logical sequence which helps in debugging.

Disadvantages of Algorithm:

 Algorithm is time consuming.

 Difficult to show branching and looping in algorithm.

 Big tasks are difficult to put in algorithm.

 It is not the program only the plan or the companions of the program.

Characteristics of an Algorithm:

 Precision: The steps are precisely or correctly defined.

 Clear instruction: Each phase of an algorithm the entry and exit must be clear and significant.

 Well-Defined Input: An algorithm should have more well-defined entries.

 Well-Defined Output: The defined algorithm should match the output described.

 Uniqueness: Result of an algorithm in each step are uniquely defined and it only depends

upon the input and the output of the steps.

 Flexible: You must be flexible with the available resources.

 Finiteness: The program must stop at a finite number of steps.

Example of an algorithm

 An algorithm in real life

One of the good examples of algorithm can be recipe. For example: in order to make tea we can use

following steps.

Step 1: Start

Step 2: Take milk, sugar and tea leaves.

Step 3: Mix the ingredients and boil them for some time.

Step 4: Stop

 Algorithm in computer life

Step 1: Start

Step 2: Declare variable num1, num2.

Step 3: Read the values num1, num2.

Step 4: Add num1 and num2 and assign sum=num1+num

Step 5: Display sum

Step 6: Stop

Outline process

Outline process is a process that produces software with the best quality with cheaper in cost. Outline

process can also be termed as SDLC (Software Development Life Cycle). It includes a detailed plan

for how to develop, alter, maintain and replace the software system. Moreover, outline process also

involves several stages, including planning, design, building, tasting and deployment. Famous

outline process models include waterfall model, spiral model and agile model.

This is the third phase of the process. After analyzing the system in the second phase, here the

needed features are added and various operations are done to design the needed system. In this phase

we will consider the essential components (hardware, software) structure, processing and procedure

for the system to achieve its objectives.

Development

This is the fourth phase of the process. In this phase now an organization work. The coding is

installed if no any issues are found. Developer will follow the code and guideline given by the

organization and the programming tools like compliers are used and various high-level language like

C, C++ and many other are used to develop various required software.

Integration and testing

The fifth phase of this process is integration and testing. In this phase the professionals will check the

program that it will work better not. The program could help the organization to achieve the goal or

not are also tested in this phase. Various errors and the bugs are also tested in this process and if

some errors are found then the errors are debugged.

Implementation

The sixth phase of the process is implementation. In this phase the implementation of the program is

done. The developer provides the program to the organization and the organization start using the

program through this phase.

Operations and Maintenance

This is the final phase of this process. In this phase, a regular check is done and if any maintenance is

required, they are also be done.

Waterfall model

The waterfall model is a sequential design process in which progress is seen as flowing steadily

downwards like a waterfall through the phases outline process. (jobsandnewstoday, n.d.)

Stages of waterfall model

Advantages

 It allows to make department and manage control.

 Simple and easy to understand and use.

 Easy to manage due to the rigidity of the model because each phase has specific deliverables

and a review process.

 Phases are processed and completed one at a time.

 Works well for smaller projects where requirements are very well understood.

Disadvantages

 It does not allow for much reflection or revision.

 Once an application is in the testing stage, it is very difficult to go back and change

something that was not well-thought out in the concept stage.

 No working software is produced until late during the life cycle.

 High amounts of risk and uncertainty.

 Not a good model for complex and object-oriented projects.

 Only senior programmers are capable of taking the kind of decisions required during the

development process. Hence it has no place for newbie programmers, unless combined with

experienced resources.

IDE (Integrated Development Environment)

An integrated development environment (IDE) is a software that combine basic tools required to

write and test software. Here developers can use number of tools during software development,

building and testing. Development tools includes text editors, compilers and testing platforms.

Without IDE developer must select, deploy, integrate and manage all the required tools separately as

their needs. However, IDE gathers many tools together in a single framework. The tools are designed

for software development and reduce errors. Some IDE’s available are open source while others are

commercial.

There are several IDE available today. Types of IDE varies from language specific or multi-

language. Microsoft Visual Studio is example of IDE with good features such as debugging, syntax

highlighting, code editing and so on. Also, there are other IDE like Eclipse, NetBeans etc. which are

very famous IDE in the market.

Microsoft’s Visual Studio

Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to

develop programs, application, websites and so on. The languages used in visual studio are C, C++,

C#, F#, visual basic .net etc.

We are using Microsoft Visual Studio 2019 4.7.2 which is very user friendly and easy to use. It is a

powerful and versatile IDE that is used in world to make software, application, websites by the help

of programming language like C#, C++ and so on. We can open our recently done projects from start

menu. From this IDE we can use console application and also visual basic .net to create software in

simple way.

I used Visual Studio over other IDE like Eclipse or NetBeans because of many reasons. Firstly,

coding in a bit easier in Visual Studio due to there exist an assistance which helps a lot. For example:

in order to write ‘parse’ just type ‘p’ and the ‘parse’ appears in the option which we found quite easy.

Also, debugging process is also very quick in this IDE. Moreover, this IDE is also user friendly and

hence we used this IDE over others. The Microsoft has given us very free version of Visual studio

called community visual studio which is very helpful in learning the programming language and this

visual studio support almost all programming language.

Programming language

A programming language is a machine language which is computer understandable language. High

level languages are nearly human languages which are more complex for the computer to understand

so machine language was introduced for machine understandable. Some of the popular programming

language are C, C#, C++, Python, JAVA, PHP etc. Among them I have used C# to develop the

Library management application.

The reason I have used this language because it is user friendly. It is very easy to use and it is also

object-oriented programming language. In this language we can define class and object in simple

way. We can also define function and call it in any method in which we want to apply. And this

programming language is best for learning the programming from basic.

Platform environment

A platform environment is the environment where program code can be executed in different for

such as windows, console, web and android. It depends on the devices or hardware that we are

building for.

I have chosen windows (.net framework) for building LMS (Library Management System) because I

want to build this application for windows desktop devices like PC, Laptop. We are developing this

program using windows 10. In this platform there is design view and coding view. So, we can design

the windows form and write the source code in coding view. Having these two categories it is easier

to write code in different event of windows form.