Professional Documents
Culture Documents
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.
Student’s signature
Grading grid
P2 P3 P4 P5 M2 M3 M4 D2 D3 D4
❒ Summative Feedback: ❒ Resubmission Feedback:
1. Procedural Programming
a) Definition of Procedural Programming
-
2. Object-Oriented Programming
a) Definition of OOP
OOPs are based on object, means everything is talked about in terms of object. An object
is a component of a program that performs actions and interacts with other elements of the
program. Object oriented programming uses reusability of code. We can take an example of
object like employee. Employee has some properties like name, salary, address etc. An Employee
can have different objects. Object Oriented Programming uses an object to design applications
and programs.
b) Characteristic of OOP
- Encapsulation – Encapsulation is capturing data and keeping it safely and securely from
outside interfaces.
- Inheritance- This is the process by which a class can be derived from a base class with all
features of base class and some of its own. This increases code reusability.
- Polymorphism- This is the ability to exist in various forms. For example an operator can
be overloaded so as to add two integer numbers and two floats.
- Abstraction- The ability to represent data at a very conceptual level without any details.
- For example:
-
-
-
3. Event-driven Program
a) Definition od Event-driven Program
Event-driven programming is a programming model in which all business logic is performed
in the source code of a program. The program's runtime thread will be determined based on
events. Events here could be:
- Click the button on the screen
- Press the key on the keyboard
- Mouse over
- Timeout
- Receives the output signal of the sensor
- Receive messages from other program or threads
4. Summary
a) Comparison between Procedural Programing and OOP
The following are the features that will show some differences between Procedural Programming
and Object-Oriented Programming:
Procedure- programming, which you can think of as traditional programming, defines the
programming process as the development of procedures that explicitly direct the flow of data and
control.
Event-driven programming defines the programming process as the development of
procedures that respond to the flow of data and control as directed by the user, program, or
operating system.
These programming models differ in flow of execution and structure. In addition, each model
works best with a particular programming environment.
1. Introduction
According to the requirements of the local high school, this report has been made to do the
following section:
2. Context
In order to find a better solution for managering all the student information, this application are
decided to design an application can help them easier in term of manager books, which include
these function:
Student Name
Student ID
Math Score
English Score
Chemistry Score
3. User Requirements
The teacher manager required this application must have at least these function:
Add
Delete
Update
III. DESIGN THE SOLUTION
1. Flowchart
2. Write Pseudo-Code
Program: Student Manager
Input Student’s name, Student ID, grades
End.
3. Development
This application has been created by utilizing C# Programming Language, coded,
repaired and prepared on Microsoft Visual Studio 2019, one of the most well-known and
effective IDE nowadays.
In order to complete this application, software’s necessities have been divided into littler
issues so that will make the calculation of each issue become easier to solve. This application
has been made by utilizing both Event-Driven Programming paradigm and Procedural
Programming paradigm.
4. User Interface
This application will provide a friendly and easy-to-use user’s interface so that
doctors and/or nurses can easily manage their student’s information. For instance,
the application will have this following user’s interfaces:
Figure 5. User Interface
In figure 5: The main interface of the application will provide the method to control
student’s information such as add, delete and edit. Additionally, the application provides to manager
a grid box, which perform all student data.
5. Source Code
Things to explain have been commented in the code itself, below is the entire source used to
form this application:
6. Implement
When the manager opens the application and presses the Add button to enter student
information, there are the operations that the user will perform:
If the user wants to edit the information entered, user will press the Edit button and do the
following:
If the user wants to delete the student data entered, user will press the Delete button and do
the following.
IV. INTEGRATED DEVELOPMENT ENVIRONMENT (IDE)
1. Introduction
According to Microsoft [CITATION Mic19 \n \l 1033 ], The Visual Studio integrated
development environment is a creative launching pad that you can use to edit, debug, and
build code, and then publish an app. An integrated development environment (IDE) is a
feature-rich program that can be used for many aspects of software development. Over and
above the standard editor and debugger that most IDEs provide, Visual Studio includes
compilers, code completion tools, graphical designers, and many more features to ease the
software development process.
Figure 6, shows Visual Studio with an open project and several key tool windows
you'll likely use:
Solution Explorer (top right) lets you view, navigate, and manage your code
files. Solution Explorer can help organize your code by grouping the files
into solutions and projects.
The editor window (center), where you'll likely spend a majority of your time,
displays file contents. This is where you can edit code or design a user interface such
as a window with buttons and text boxes.
Team Explorer (bottom right) lets you track work items and share code with
others using version control technologies such as Git and Team Foundation Version
Control (TFVC).
After opening the software, the basic function that a coder will need to do:
Code Cleanup
With the click of a button, format your code and apply any code fixes suggested by
your code style settings, .editorconfig conventions, and Roslyn analyzers. Code Cleanup helps
you resolve issues in your code before it goes to code review. (Currently available for C#
code only.)
Refactoring
Refactoring includes operations such as intelligent renaming of variables, extracting
one or more lines of code into a new method, changing the order of method parameters, and
more.
Figure 9. Refactoring
IntelliSense
IntelliSense is a term for a set of features that displays information about your code
directly in the editor and, in some cases, write small bits of code for you. It's like having basic
documentation inline in the editor, which saves you from having to look up type information
elsewhere. IntelliSense features vary by language. For more information, see C#
IntelliSense, Visual C++ IntelliSense, JavaScript IntelliSense, and Visual Basic IntelliSense. The
following illustration shows how IntelliSense displays a member list for a type:
Search box
Visual Studio can seem overwhelming at times with so many menus, options,
and properties. The search box is a great way to rapidly find what you need in Visual
Studio. When you start typing the name of something you're looking for, Visual Studio
lists results that take you exactly where you need to go. If you need to add
functionality to Visual Studio, for example to add support for an additional
programming language, the search box provides results that open Visual Studio
Installer to install a workload or individual component.
Go To Definition
The Go To Definition feature takes you directly to the location where a function or type is
defined.
Peek Definition
The Peek Definition window shows the definition of a method or type without actually
opening a separate file.
Figure 14. Peek Definition
3. Summary
Advantages of using IDE
IDEs are simply programs to write programs. They are generally editing
environments with tools to help programmers write code quickly and efficiently. As an
example, we can create PHP-driven web applications using a combination of Eclipse and PHP.
Core features typically include:
There are also a lot of other advantages that IDE would bring to developers such as:
communicate with database systems, multiple project configurations, bookmarking code
segments, etc.
The ability of an IDE to know a language’s keywords and function names is crucial.
The IDE may use this knowledge to do such things as highlight typographic errors, suggest a
list of available functions based on the appropriate situation, or offer a function’s definition
from the official documentation.
Figure 15. Code Completion
Solution Explorer
Visual Studio provides a Solution Explorer window that enables you to explore and
manage your solutions and projects. To open the window select View > Solution Explorer.
Solution Explorer displays the projects that form your solution, the files and folders in
a project as they appear on the physical hard drive, and any assemblies, COM objects or files
the project references. The context menus within Solution Explorer provide a variety of
commands that help you manage your projects.
Default view:
Searching in Solution Explorer:
You can use the search field in Solution Explorer to search for files in your solution.
Searching also finds copybooks in the copybook dependency view even if they are not part of
any of the projects in the solution:
Compile and build
When compiling, Visual Studio not only execute the code on the debugging mode, but
also displaying the application’s diagnostics, where indicate the process memory, how CPU
process, etc. to help developers consider the efficiency of the code when it’s running and then
make changes if something went wrong
Debugging tools
1. What is Debugging
Syntax error
Runtime error
Semantic error
Logic error
Even if developers use the same coding standard, it's more than likely that a new software
program will still have bugs. In many cases, the process of debugging a new software program
can take more time than it took to write the program. Invariably, the bugs in software
components that get the most use are found and fixed first.
In order to reduce the complexity of Debugging process, Debugger, which is one of IDEs
most basic functions, will help developers to indicate where the bugs occur, types of the
bugs and suggest for solution by using Breakpoints or Step-by-step code executing.
When an IDE detects a syntax error, it will often help you by highlighting the section of code
where it has detected the error.
It’s useful to remember that the IDE may not always highlight the actual error. In this
example, the variable name has been highlighted, but the error is actually the extra key word
before it (that isn’t used in Python).
Tip: if you see code highlighted, check the previous line of code for an error.
Breakpoints
Breakpoint in an IDE is a useful tool that allows you to pause a program at a specific line of
code to check the value of variables.
Usually, a breakpoint can be inserted into the code editor by clicking on the line number on
the left. They are generally identified as red circles over the line number.
Steppers
Steppers are similar to breakpoints as they will pause the running of the code at a specific
line, but they also allow you to keep running the code line by line by pressing a specific key on
the keyboard.
This allows you as a programmer to check the value of variables at each step of the code
(very similar to creating a trace table for a variable).
Watch
The Watch Window allows you to see value of variables and expressions while debugging.
It’s kind of like the DataTip you get when hovering over a variable, except that you can write any
expression you want. It’s available from Debug | Windows | Watch | Watch 1.
Commenting Conventions
o Place the comment on a separate line, not at the end of a line of code.
o Begin comment text with an uppercase letter.
o End comment text with a period.
o Insert one space between the comment delimiter (//) and the comment text, as
shown in the following example.
Indentation
Proper indentation is very important to increase the readability of the code. For
making the code readable, programmers should use White spaces properly.