Professional Documents
Culture Documents
Assignment 2 - 1618 - Report
Assignment 2 - 1618 - Report
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.
Grading grid
P2 P3 P4 P5 M2 M3 M4 D2 D3 D4
1
Summative Feedback: Resubmission Feedback:
2
Table of Content
I. Introduction my program………………………………………………………………………………………….……5
1. Introduce the Overview…………………………………………………………………………………………….……5
2. List out application’s requirements………………………………………………………………………………..5
II. Explain programming paradigms…………………………………………………………………………………….5
1. Explain what is Procedural Programming with source code and illustrations………………….5
2. Explain what is Object-Oriented Programming with source code and illustrations…………6
3. Explain what is Event-Driven Programming with source code and illustrations………………7
4. Conclude which paradigms will be used to develop the application with explanation……9
III. Design and Implementation…………………………………………………………………………………………10
1. Flowchart……………………………………………………………………………………………………………………..10
2. Source code and screenshots of the final application with explanation………………………..11
3. Explain and evaluate coding standards used in the program………………………………………..18
4. Explain the benefits of using coding standards…………………………………………………………….20
References……………………………………………………………………………………………………………………………….21
3
Figure 1: POP in programming
Figure 4: Flowchart
Figure 5, 6: Book.cs
Figure 7, 8: Library.cs
4
I. Introduce my program
5
Figure 1: POP in programming
6
- 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.
- Abstraction: Calculation help remove the unnecessary complexity of the object and
focuses only on what is essential.
7
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 service-oriented only uses a tiny percentage of the computer
processing power and services typically operate in the operating 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.
8
4. The concluding model I will be used to develop the application with an explanation
I used OOP and mixed a little POP to build a library management program in this
program. I use OOP and POP, and I use both because it's easier to manage code when a
program changes and system-wide data is shared between functions in the program,
thanks to POP.
Instead of changing the object's source code, the programmer only needs to change
some component functions.
Easy project expansion.
Help programmers can significantly save system resources.
OOP is highly secure and reusable.
9
III. Design and Implementation
1. Flowchart
Start
Input Choose
true
Choose = 1 Enter information of book
false true
Choose = 2 Show information entered
false true
Choose = 3 Find book by name of author
false true
false
Figure 4: Flowchart
10
2. Source code and screenshots of the final application with the explanation
Book.cs
Figure 5: Book.cs
Figure 6: Book.cs
11
Library.cs
Figure 7: Library.cs
Figure 8: Library.cs
12
Function main: cases that users will choose in my library manager program.
Menu: These are all the essential functions a library management program needs. When
users need a function, they need to press a number corresponding to that function to
use it.
13
Input: User enters the number of books to add.
Display: Displays information of entered books such as book title, author name, price,
language, year of manufacture, manufacturer, and semester.
Searching by name of author: When the user enters the name of an author, the
program will display the works written by that author that has been saved on the library
management program.
14
Searching by name of the book: When the user enters the name of the work, the
program will display all the information of that work that has been entered.
Delete: Users who want to delete a book need to enter the name of the work and
delete that book from the library management software.
15
Result
Enter the number corresponding to the choice
16
Display information of books just enter
17
Delete book by name
18
Building a program can be frustrating if there is no clarity between methods when a
programmer needs to add something to a method if there is a blank line between
methods, will create transparency, the programmer will be able to find a method that
needs editing quickly, I have also implemented it in my library manager, and I find it very
useful in the process your program builder.
Rules of the brackets
There are two rules for closing the brackets:
- Put brackets on the same line as the keyword
- Put brackets on the next line to align with closing brackets
In my program, I used solution two because I feel when I write multiple blocks of
commands, I align parentheses to easier code management.
If statement
Always put the comparison variable on the left and the comparator on the right.
19
Length of a line of code
In my program, each line of code contains only one statement, and each line should
have no more than 78 characters for optimal display.
20
References
Lelli, F., 2019. francescolelli. [Online]
Available at: https://francescolelli.info/
[Accessed 22 8 2022].
21