You are on page 1of 25

ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 1: Programming

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Lê Thái Trung Tín Student ID GCS210085

Class PROG1618 Assessor name

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:

Grade: Assessor Signature: Date:


Lecturer Signature:
Contents
Chapter 1 –Introduction to your program. (P1) ............................................................................................................ 5

❖ 1.1Introduce the Overview: ..................................................................................................................................... 5

❖ 1.2List the function of the program:........................................................................................................................ 5


Chapter 2 –Explain programming paradigms. (P1) ....................................................................................................... 5

❖ 2.1Explain what is Procedural Programming with source code and illustrations ................................................... 5
Characteristic: ............................................................................................................................................................... 5

❖ 2.2 Explain what is Object-Oriented Programming with source code and illustrations .......................................... 6

❖ 2.3Explain what is Event-Driven Programming with source code and illustrations ................................................ 7

❖ 2.4Conclude which paradigms will be used to develop the application with an explanation ................................ 9
Chapter 3 –IDE features. (P1) ........................................................................................................................................ 9

❖ 3.1Introduce what an IDE is ..................................................................................................................................... 9

❖ 3.2.2Highlight the syntax contained in the code: .................................................................................................. 10

❖ 3.3An explanation and evaluation of the debugging process in the IDE used and how it helped with
development ............................................................................................................................................................... 10

❖ 3.4Evidence that you have used debugging during the implementation.............................................................. 11

❖ 3.5An evaluation of developing applications using an IDE versus developing an application without using an
IDE ............................................................................................................................................................................... 11

❖ 4.1Flowchart of the application ............................................................................................................................. 12


Chapter 4–Design and Implementation(P5) ............................................................................................................... 15

❖ 4.2 Source code and screenshots of the final application with explanation ......................................................... 15

❖ 4.2.1 Source Code .................................................................................................................................................. 15

❖ 4.2.2 Screenshots of the final application ............................................................................................................. 20

❖ 4.2Explain the benefit sofusing coding standards ................................................................................................. 23


REFERENCES ................................................................................................................................................................ 24
Chapter 1 –Introduction to your program. (P1)

 1.1Introduce the Overview:

• Nowadays, there are many schools in the country. There are many students informations.
Therefore, it is not easy to manage student infomations. Seeing this difficulty, I wrote a
program to manage student data.

 1.2List the function of the program:

• Insert new student


• View list of Students
• Search a student by class
• Exit

Chapter 2 –Explain programming paradigms. (P1)

 2.1Explain what is Procedural Programming with source code and illustrations.

• Procedure-oriented programming, often known as procedural programming, is a classic


programming method that divides a program into functions.
• Subroutines execute with the aid of other functions or smaller subroutines. In other words,
structured programming reduces a large problem to a smaller one and a smaller one to a
smaller one. Once the issue is resolved, keep going. Simply put, structured programming breaks
down a big problem into a small problem, a minor problem into a micro problem. And so on
until the problem is solved.

Characteristic:

• While designing a program, POP follows a top-down programming approach.


• Most functions allow system-widedata to be shared.
• It also divides more extensive programs into smaller parts called functions.
• It allows data to move freely around the system.
• Functions convert data from one form to another.
Figure 1 POP in the program.
(Source: https://docs.microsoft.com/en-
us/windows/win32/rpc/thehttps://docs.microsoft.com/en-
us/windows/win32/rpc/the-programming-
modelprogramming-model)

 2.2 Explain what is Object-Oriented Programming with source code and illustrations.

• OOP is considered to increase productivity, simplify maintenance complexity, and extend


software by allowing programmers to focus on higher-order software objects. In addition,
many people think that OOP is more receptive to those who are new to programming than
previous methods. In a nutshell, this is a concept and an attempt to lighten the code for
programmers, allowing them to create applications where external elements can interact with
those programs. like interacting with physical objects.
• Objects in an OOP language are combinations of code and data that are seen as a single unit.
Each object has a unique name, and all references to that object are made through its name.
Thus, each object has the ability to receive messages, process data (inside it), and send out or
respond to other objects or to the environment.
• Characteristic:
 Inheritance: Inheritance allows building a new class (Child class), inheriting and
reusing properties and methods based on the old class (Parent class) that existed
before. The Child classes inherit all the Parent class members and do not need to
be redefined. Subclasses can extend inherited components or add new ones.
 Polymorphism: Diversity in OOP settings allows different objects to perform the
same function differently.
 Encapsulation: Encapsulation allows hiding information and the internal
processing properties of the object. Other objects cannot directly affect the data
inside and change the object's state but must go through public methods provided
by that object. This property helps to increase the object's security and avoid
unintentional data corruption.
 Abstraction: Calculation help remove the unnecessary complexity of the object
and focuses only on what is essential.

Figure 2 OOPs in program.

(source: https://www.quora.com/What-are-the-objects-in-object-oriented-programming)

 2.3Explain what is Event-Driven Programming with source code and illustrations.

●In computer programming, event-driven programming is a programming paradigm in which the


flow of a program is determined by events such as user actions (clicks, key presses, etc.), sensor
output, or messages from programs or streams. Event-driven programming is the dominant
paradigmused in graphical user interfaces and other applications (e.g. JavaScript web
applications) that focus on performing certain actions in response to input. User input. The same
is true for programming for device drivers (e.g. P in the USB device driver stack).
●In an event-driven application, there is usually a main loop that listens for events and then fires
a callback function when one of those events is detected. In embedded systems, the same can be
achieved by using hardware interrupts instead of a continuously running main loop. Event-driven
programs can be written in any programming language, although the task is easier in languages
that provide a high level of abstraction, such as to await and closure ●Characteristic:
 Service-Oriented: Service-oriented is a significant aspect of event-driven programming
used to develop programs for services. It does not slow down the computer since
serviceoriented only uses a tiny percentage of the computer processing power, and
services typically operate in the perating system's background.
 Even: Nothing will happen unless the user interacts with the software, according to this
feature. Clicking buttons and entering text into text fields are examples of events.
 Trigger Functions: According to this feature, nothing will happen until the user interacts
with the software. Events include things like clicking buttons and putting text into text
areas.
 Event handlers: When an event happens, an event handler is a function or method that
performs a particular action. An event handler may, for example, be a button that, when
clicked, shows a message and then shuts it when the user hits the button again.

Figure 3 Event Driven Programming flowchart


(Source: https://www.tutorialspoint.com/concurrency_in_python/concurrency_in_python_eventdriven_programming.htm)
 2.4Conclude which paradigms will be used to develop the application with an explanation.

• I have used OOP and a mixture of POP to build a student data management program. I use
OOP and POP and I use both because it will be easier to manage students when the program
will help find student data in the system without having to find each student's records as before.
• Easy project expansion.
• Help programmers can save considerable time.

Chapter 3 –IDE features. (P1)

 3.1Introduce what an IDE is

• To put it simply, an IDE is a combination of functions that help you program, debug, and
compile. IDEs are developed to make it easier for programmers to develop software.
• IDE stands for Integrated Development Environment -integrated development environment.
• Before IDEs were developed, the only way for programmers to program was to use Texteditor
software, such as Notepad.
 Source code editor: A text editor that can assist in writing software code with
features such as syntax highlighting with visual cues, providing language-specific
auto-completion, and checking for bugs as code is being written.
 Local build automation: Utilities that automate simple, repeatable tasks as part of
creating a local build of the software for use by the developer, like
compilingcomputer source code into binary code, packaging binary code, and
running automated tests.
 Debugger: A program for testing other programs that can graphically display the
location of a bug in the original code.
Figure 4: The ability to detect error
(Sourcehttps://helpex.vn/question/tu-dong-phat-hien-loi-trong-intellij-idea-60dd4c5f7a3582d36e88e247)

 3.2.2Highlight the syntax contained in the code:

• Programmers can readily discern syntaxes in code by using IDEs' ability to display them in
different colors, making it simple to link code together.

Figure 5 High light the syntax contained in the code (source


https://www.thegioididong.com)

 3.3An explanation and evaluation of the debugging process in the IDE used and how it helped
with development.

 When building a large program, a professional programmer will spend no less time writing
test code than they spend writing the program itself. Therefore, we will not be able to
avoid basic errors while programming. But when in a long test code that we only make a
small mistake in it, it will take a lot of time to check and fix that error. But I've heard some
people say that IDE's debugger is very good,it helps users to find errors and help them fix
them. In this article, I have not used the debugger because my program writing is small
and quite easy. I'll be using the debugger in a not too distant day.

 3.4Evidence that you have used debugging during the implementation.

 Unfortunately I didn't use the debugger when writing the program. Since my program is
pretty small and basic I haven't used the debugger. I will probably use it with the next
program I write.One day I might need it.

 3.5An evaluation of developing applications using an IDE versus developing an application


without using an IDE.

 IDE is an integral part of the software application development process. With the IDE and
the tools it brings, the programming process becomes more convenient, easier, and less
error-prone. In the absence of an IDE, you can write source code using the corresponding
compiler of the programming language. This work will require a lot of time, adding many
complicated steps, but not bringing the desired effect, especially in programs with difficult
programming steps. Benefits of using IDE software with its advantages, IDE is
indispensable in the process of writing software applications. They are sought after by
many programmers, although not necessary, but necessary. IDE is known as divine
software for programmers in developing software applications.
4Chapter 4 –Design and Implementation. (P1)

 4.1Flowchart of the application.

• Insert a new student:

Figure 6 Flowchart Insert a new student in my


source code
• Search a student by class:

Figure 7 Flowchart Search a student's by class in my source code


• View list of Student’s:

Figure 8 View list of Student's in my source code


Chapter 4–Design and Implementation(P5)

 4.2 Source code and screenshots of the final application with explanation.

Figure 9 My source code

 4.2.1 Source Code.

Figure 10 My source code


Figure 11 My source code
Figure 12 My source code
Figure 13 My source code
Figure 14 My source code

Figure 15 My source code


Figure 16 Menu in my program

 4.2.2 Screenshots of the final application

After the software has run, this is the menu screen.


The software will display 4 selections.
 1. Insert new student
 2. View list of students
 3. Search students(by class)

Figure 17 Menu and Insert new Student

After running the program, a menu will appear and you choose 1 of the 4 options
above. And When you choose option 1.
And after choosing option 1, the user is prompted to input student information (name,
date of birth, grade, class, mobile).
The user will then enter the following information and after checking the appropriate
data the screen will display "Successfully inserted a student"

Figure 18 View list of students

When choosing option 2, the screen will display all information of all students who
have been loaded into data including (name, date of birth, grades, class, mobile)
Figure 19 Search students by class

After selecting 3 options, the program will prompt you to enter the student's class and
will display the student's information in that class.

Figure 20 EXIT

And finally when selecting option 4 the screen will display "exited with code 0. Press
any key to close this window . . ."
After pressing any key you will exit the program's window.
 4.2Explain the benefit sofusing coding standards

• Minimize the risk of the project:Often, IT projects fail due to software development
problems , and codings tandards reduce the risk of failures.
• Reduces complexity: The greater the complexity of a code, the more prone it is to
mistakes. Coding standards aid in developing software systems with less complexity, hence
reducing errors.
• Correction of bugs: Aconsistent source code makes it simple to find and fix flaws in
software.
• A comprehensi veview: A consistent source code allows for a better understanding of how
the code fits into the more extensive program or the firm as a whole.
REFERENCES

1.w3schools.com, Availableat: https://www.w3schools.com/?fbclid=IwAR0nX84qRVujvA-


9UBkVPX89C16zmH3ess3sziJPkZwb7OlYEdGFGAsRpk
[Accessed 28June 2022]
2. CodeLean.Classandobject.[Online]
Availableat:https://www.codelean.vn/2019/12/java-coban-su-khac-biet-giua-class-va.html [Accessed
28June.2022].
3.NavigatethroughcodewiththeVisualStudiodebugger.
[Online]Availableat:https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-
codewith-thedebugger?view=vs-2019 [Accessed 28June.2022].
4.Debuggingprocess.
[Online]Availableat:https://economictimes.indiatimes.com/definition/debugging [Accessed
28June.2022].
5.Codingconventions.[Online]Availableat:https://en.wikipedia.org/wiki/Coding_conventions [Accessed
28June.2022].
6.geeksforgeeks.org,2021.C#CodingStandards.
[Online]Availableat:https://www.geeksforgeeks.org/c-sharp-coding-standards/ [Accessed
28June.2022].
7.economictimes.indiatimes.com,2021.Definitionof'Debugging'.
[Online]Availableat:https://economictimes.indiatimes.com/definition/debugging [Accessed
28June.2022].
228.BTechSmartClass.Eventdrivenparadigm.[Online]Availableat:http://www.btechsmartclass.com/j
ava/java-oop-concepts.html [Accessed 28June.2022].
9.CodeLean.Codingstandard.[Online]Availableat:https://codelearn.io/sharing/codingstandards-va-
cachhttps://codelearn.io/sharing/codingstandards-va-cach-viet-code-cppviet-code-cpp
[Accessed 28June.2022].
10.CharacteristicsofObject–orientedparadigm.
[Online]Availableat:https://vn.got-it.ai/blog/tinhke-thua-trong-oop-va-cac-loai-ke-thua-ban-can-biet
[Accessed 28June.2022] 11.OrientedProgramming.
[Online]Availableat:https://www.analyticsvidhya.com/blog/2020/10/inheritance-object-
orientedhttps://www.analyticsvidhya.com/blog/2020/10/inheritance-object-oriented-
programming/programming/ [Accessed28June.2022]

You might also like