Programming Paradigms and Debugging Techniques for Zoo Management Application - Prof. Tran, Study notes of Wireless Networking

An overview of various programming paradigms, including procedural programming, object-oriented programming, and event-driven programming, and discusses their advantages and disadvantages. It also introduces a zoo management application developed using these programming models, highlighting the implementation of basic algorithms and the debugging process. The importance of coding standards, the benefits of using standard coding practices, and the specific standards employed in the zoo management application. Overall, this document serves as a comprehensive guide to understanding the programming concepts and techniques used in the development of the zoo management application.

Typology: Study notes

2021/2022

Uploaded on 06/05/2022

hoang-anh-tran-1
hoang-anh-tran-1 🇻🇳

5 documents

1 / 26

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 2 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 1: Programming
Submission date
20/4/2022
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
DAO XUAN CAT
Student ID
Bh00339
Class
IT0501
Assessor name
NGO THI MAI LOAN
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
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download Programming Paradigms and Debugging Techniques for Zoo Management Application - Prof. Tran and more Study notes Wireless Networking in PDF only on Docsity!

ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 1: Programming Submission date 20/4/2022 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name DAO XUAN CAT Student ID Bh Class IT0501 Assessor name NGO THI MAI LOAN 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 D

Summative Feedback:Resubmission Feedback: Grade: Assessor Signature: Date: Lecturer Signature:

1. Procedural programming A programming model that divides a program into functions or chapters sub program. Each program can also be divided into several programs others to simplify their work. Advantage - Procedural programming is great for general purpose programming. - Codified simplicity with ease of implementation of compilers and interpreters - A large number of books and online course materials have written procedurally oriented algorithms, making it easy to learn. - The source code is portable, so it can also be used to target another CPU - The code can be reused in different parts of the program, without having to duplicate it - Through procedure-oriented programming technique, memory requirements are also reduced - Program stream can be watched easily Disadvantage - Large program code is harder to write, harder to maintain, more buggy.

  • Procedural code is often not reusable, which may require rewriting the code if it needs to be used in another application.
  • Difficult to describe with real-world objects
  • Procedure-oriented programs focus on manipulation instead of data, which can cause problems in some data- sensitive cases
  • Data is displayed for the entire program, making the data security not very good. 1.2 Object Oriented Programming: is a computer programming model that designs software around data, or objects, instead of functions and logic. Inheritance It allows to construct a new class based on existing class definitions. This means that the parent class can share data and methods with the child classes. Subclasses do not have to be redefined, in addition, they can extend inherited components and add new components. Reuse the source code in an optimal way, taking advantage of the source code. Some common types of inheritance: single inheritance, multiple inheritance, multi-level inheritance, hierarchical inheritance. Polymorphism Polymorphism is a concept where two or more classes have the same methods but can be implemented in different ways. Abstraction abstraction means choosing the properties and methods of the object needed to solve the problem you are programming. Because an object has a lot of method properties, but for a particular problem, it is not necessary to select them all. Encapsulation Related data and methods are encapsulated into classes for ease of use and management. That is, each class is built to perform a specific set of functions for that class. Advantage
  • Due to its modularity and encapsulation, OOP provides easy management

II. implement basic algorithms in code using an IDE In this composition, I'll introduce you to the zoo management operation that I developed. There are 4 function. I've added features to add, edit, cancel and login in windows form below will be each illustration and how the features work. Login: as you can see an account and word are needed to pierce the app, enhanced security anti-hacking.

there is no other "else" case so if you enter it wrong you won't be able to enter form 1. ADD data, just enter the information and click on the add tab to easily add objects

As you can see, the click button is used to fit objects into the table after it has been imported. with data types of type string for insert name and type and int 32 for the number so if you class it wrong it will not be suitable to add data. The line Animal animal = new Animal(name, type , amount); for add and show the object in board. Edit: transvalue

In the editing section, you can edit each content right on the table, or you can edit an entire line by pressing that line and entering data in the cell and opting edit. you re-enter the same objects as the Add case section. the program will replace that line with null and add new objects. DELETE: Just point to the line of the object to be deleted and then press the delete button to delete the object from the table

To delete the object, you need to select the correct line and press the delete button. The program will automatically delete all data with the command "RemoveAt" in the listAnimal table. Then the dgvAnimal will return result = null. III. Debug process

the program will jump directly to the error point where you set the breakpoint. Example of running debug process

Step into: Press f10 to let the program check the next line. As you can see, the value “cho” was wrong and have reported error on name

Step out : Press “shift + f11” to jump on next breakpoint , if haven’t have any break point , program will end the debug process