Assignment 2 C#
Assignment 2 C#
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
1 | Minh Triet
Summative Feedback: Resubmission Feedback:
2 | Minh Triet
Table of Contents
I. Introduction to your program ................................................................................................................. 5
1. Introduce the Overview/ Context of the problem .............................................................................. 5
2. List out application’s requirements ..................................................................................................... 5
II. Programming paradigms ......................................................................................................................... 6
1. What is Object-Oriented Programming (OOP) .................................................................................... 6
2. What is Procedural Programming ....................................................................................................... 7
3. What is Event-Driven Programming with source code and illustrations ............................................ 8
4. Paradigms will be used to develop program ....................................................................................... 9
III. IDE features ....................................................................................................................................... 10
1. Introduce what is IDE ........................................................................................................................ 10
2. Introduce features of IDE .................................................................................................................. 10
3. An explanation and evaluation of the debugging process in the IDE used and how it helped with
development. ........................................................................................................................................... 10
4. Evidences that you have used debugging during the implementation ............................................ 12
5. An evaluation of developing applications using an IDE versus developing an application without
using an IDE. ............................................................................................................................................. 12
IV. Design and Implementation .............................................................................................................. 13
1. Flowchart of the application ............................................................................................................. 13
2. Source code and screenshots of the final application with explanation .......................................... 14
3. Explain and evaluate coding standards used in the program ........................................................... 22
4. Explain the benefits of using coding standards ................................................................................. 23
3 | Minh Triet
Figure 1 Application Design ............................................................................................................................ 5
Figure 2 Example Class ................................................................................................................................... 6
Figure 3 Class and Objects .............................................................................................................................. 7
Figure 4 Example Procedural Programming ................................................................................................... 8
Figure 5 Event-Driven Programming .............................................................................................................. 8
Figure 6 Build project ..................................................................................................................................... 9
Figure 7 Debug.............................................................................................................................................. 11
Figure 8 Used Debug .................................................................................................................................... 12
Figure 9 Flowchart ........................................................................................................................................ 13
Figure 10 Application Source code ............................................................................................................... 14
Figure 11 Login source code ......................................................................................................................... 15
Figure 12 Login program .............................................................................................................................. 15
Figure 13 Table Produce management ........................................................................................................ 16
Figure 14 Lock control .................................................................................................................................. 17
Figure 15 Source code lock/open control .................................................................................................... 17
Figure 16 Open control ................................................................................................................................. 17
Figure 17 Edit feature ................................................................................................................................... 18
Figure 18 Code button Add .......................................................................................................................... 18
Figure 19 Add feature ................................................................................................................................... 18
Figure 20 Check() Functionn ......................................................................................................................... 19
Figure 21 Code Button Edit .......................................................................................................................... 19
Figure 22 Delete feature............................................................................................................................... 20
Figure 23 Example Check() Function ............................................................................................................ 20
Figure 24 Button Delete function ................................................................................................................. 20
Figure 25 DataGridproduce table ................................................................................................................. 21
Figure 26 Produce table ............................................................................................................................... 21
Figure 27 Exit application ............................................................................................................................. 21
Figure 28 Naming rule .................................................................................................................................. 22
4 | Minh Triet
I. Introduction to your program
1. Introduce the Overview/ Context of the problem
This client project required me to program an application to manage goods. In this project, customers
require to import and export product information to a screen for easy management.
5 | Minh Triet
II. Programming paradigms
1. What is Object-Oriented Programming (OOP)
Object-oriented programming is about creating objects that contain both data and methods. As a result,
an entity is similar to a miniature program or a self-contained component, making the OOP solution more
modularized and therefore simpler to manage and expand. (Nguyen, March 30, 2020)
In OOP, there are 5 concepts such as: class, method, property, field, object
A class in object oriented programming represents a collection of objects with the same characteristics,
behavior, and operation methods.
In which the properties of the object are called fields, the properties of the object are shown externally
through properties of the class.
6 | Minh Triet
In C # an object is an instance of a class. Class represents a set of objects that share characteristics and
behaviors. When you instantiate an instance of a class, that instance is the object.
7 | Minh Triet
Figure 4 Example Procedural Programming
8 | Minh Triet
4. Paradigms will be used to develop program
In short, the programming methods have their own characteristics depending on the programmer's use.
In this project I used event-driven programming to solve the problem that the client delivered. I think
event-driven programming has enough customer elements such as ease of use, full operation functions,
and easy-to-manage interface.
It has full import and export and its good functioning instances
9 | Minh Triet
III. IDE features
1. Introduce what is IDE
IDE (Integrated Development Environment) is an integrated environment used to write code for
application development. To make it easy to understand, this is computer software that supports
programmers to write code, and they are packed with a lot of features to make coding simpler. In addition,
the IDE integrates other supporting tools such as compiler (Compiler), interpreter (Interpreter), error
checking (Debugger), formatting or highlighting code, organizing code directory, searching code ... (Anon.,
2020)
10 | Minh Triet
The debugging process in the IDE
The IDE debugger allows you to change the values of variables at run time.
The IDE debugger lets you see the values of variables you don't know you want to see when you start your
execution.
The IDE debugger allows you to view call stacks and check the status of a function through unknown values.
(think this function is being called from hundreds of places, you don't know where these weird values
come from)
The IDE debugger allows you to break an execution condition at any point in the code, based on a
condition, not line numbers.
The IDE debugger will allow you to check the program's status in case an exception hasn't been handled
instead of just appearing.
Evaluation
I believe that debugging is a great deal to learn for any creator. Once you know how you can do this, it is
faster to debug such error types than just an IDE. Programmers who know the procedure are therefore
very familiar with what information is required for debugging purposes in a log message..
Figure 7 Debug
11 | Minh Triet
4. Evidences that you have used debugging during the implementation
Opposite, If you do not use IDE in C # you will find the program more difficult to manage and manipulate.
When the work environment does not allow the use of IDEs. Dat's choice is to use Vim or Sublime Text to
code. Because it's handy, everywhere. But if there is an IDE that helps Dat do everything handy, Dat will
choose the IDE.
Every time you code, you have to think a lot before compiling, because it will be error, and it will be difficult
to debug. I have to build my own debugging method for my product. At that time, there was no IDE that
could support it, so we had to use Editor.
12 | Minh Triet
IV. Design and Implementation
1. Flowchart of the application
Figure 9 Flowchart
13 | Minh Triet
2. Source code and screenshots of the final application with explanation
This is the main processing code in the application. Here I have fully programmed the features required by
the client. Programmed features work and do their job correctly
14 | Minh Triet
When starting the application I programmed to ask the user to enter a username and password to be able
to use the application.
15 | Minh Triet
Here is the full source code for the login forms. Here I programmed two buttons "Login" and "Exit". If the
user logs in, the application will display a version to manipulate the features that the customer has
requested.
The application is programmed based on customer requirements and has one of the following features:
16 | Minh Triet
The "Save" feature is used to save product information on the screen. When the "Add" or "Edit" feature is
not selected, this feature cannot be operated.
When you click on the operation, the "Add" or "Edit" feature "Save" will be active.
When clicking the add button, the save button will be opened and the user will start filling in information.
Click on the save button, the product information will be displayed on the screen
17 | Minh Triet
Figure 19 Add feature
18 | Minh Triet
Figure 21 Code Button Edit
In this feature will find the location information changes and save it in the new value.
This function is used to check the information entered. If the required information is blank, the program
will notify the user.
19 | Minh Triet
Figure 23 Example Check() Function
Delete button
20 | Minh Triet
Figure 27 Exit application
In the end to save all the data and display them on the app I used dataGridView. I will divide 4 columns to
store data corresponding to the 4 information that I enter. This function will find the location of each data
and pass it on.
21 | Minh Triet
3. Explain and evaluate coding standards used in the program
When programming a large project, it is necessary to join a team. In a group there are necessarily some
popular programming codes as follows:
Naming rules:
Names need to express their meaning explicitly. Avoid ambiguous, confusing naming schemes (most
Spacing a tab space for the statement immediately after if, else, while, for, foreach.
Note:
Encourage comments on confusing code or special functions. The language used for comments must be
in sync throughout the program.
22 | Minh Triet
4. Explain the benefits of using coding standards
Coding standards help master object programming in C #. Programmers have standards that make code
management easier to simplify source code and have brought a number of benefits such as
Code-writing will make it easier for team or project members to read each other's code, as well as easier
to maintain and correct errors.
It is more convenient for other developers when they learn old projects to develop more
They give a consistent look to the code, so readers can focus on the content, not the layout.
They allow readers to understand code faster by making assumptions based on previous experience.
23 | Minh Triet
V. References
Anon., 2020. TopDev. [Online]
Available at: https://topdev.vn/blog/ide-la-gi/
[Accessed 20 4 2021].
24 | Minh Triet