Assignment 2 1618 ...., Assignments of Software Engineering

Assignment 2 1618 P...................

Typology: Assignments

2021/2022

Uploaded on 11/25/2022

thai-van-chien
thai-van-chien 🇻🇳

5 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 2
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
Thai Van Chien
Student ID
GCH210162
Class
GCH1103
Assessor name
Dang Van Long
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
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Assignment 2 1618 .... and more Assignments Software Engineering in PDF only on Docsity!

ASSIGNMENT 2

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 Thai Van Chien Student ID GCH Class GCH1103 Assessor name Dang Van Long 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:

Table of Picture

  • Chapter 1 – Introduction to your program
    • 1.1 Introduce the Overview/ Context of the problem
    • 1.2 List out application’s requirements
  • Chapter 2 – Explain programming paradigms
    • 2.1 Explain what is Procedural Programming with source code and illustrations
    • 2.2 Explain what is Object-Oriented Programming with source code and illustrations
    • 2.3 Explain what is Event-Driven Programming with source code and illustrations
    • 2.4 Conclude which paradigms will be used to develop the application with explanation
  • Chapter 3 – IDE features
    • 3.1 Introduce what is IDE
    • 3.2 Introduce features of IDE with illustrations
    • 3.3 An explanation and evaluation of the debugging process in the IDE used and how it helped with development.
    • 3.4 Evidences that you have used debugging during the implementation
    • 3.5 An evaluation of developing applications using an IDE versus developing an application without using an IDE.
  • Chapter 4 – Design and Implementation
    • 4.1 Flowchart of the application
    • 4.2 Source code and screenshots of the final application with explanation
    • 4.3 Explain and evaluate coding standards used in the program
    • 4.4 Explain the benefits of using coding standards
  • Bibliography
  • PICTURE 1: EXAMPLE OF PROCEDURAL PROGRAMMING
  • PICTURE 2: EXAMPLE ABOUT OOP
  • PICTURE 3 : IDE
  • PICTURE 4 : TEXT EDITOR
  • PICTURE 5 : DEBUGGER
  • PICTURE 6: EXAMPLE OF IDE
  • PICTURE 7 : DEBUGGING
  • PICTURE 8 : IDENTIFY
  • PICTURE 9 : USE DEBUG
  • PICTURE 10 : FIX BUG
  • PICTURE 11 : MENU & OPTION
  • PICTURE 12 : BTNADD
  • PICTURE 13 : BTNEDIT
  • PICTURE 14 : BTNDELETE
  • PICTURE 15 : BTNSORT
  • PICTURE 16 : BTNSEARCH
  • PICTURE 17 : BTNCONFIRM
  • PICTURE 18 : BTNTOTALUP
  • PICTURE 19 : LOGIN
  • PICTURE 20 : EXIT
  • PICTURE 21 : MAIN FORM
  • PICTURE 22 : ADD BOOKS
  • PICTURE 23 : BEFORE EDIT
  • PICTURE 24 : AFTER EDIT
  • PICTURE 25 : BEFORE DELETE
  • PICTURE 26 : AFTER DELETE
  • PICTURE 27 : BEFORE SORT
  • PICTURE 28 : AFTER SORT
  • PICTURE 29 : SEARCH AND CONFIRM
  • PICTURE 30 : SALES
  • PICTURE 31 : LAYOUT
  • PICTURE 32 : INDENTATION

Chapter 1 – Introduction to your program

1.1 Introduce the Overview/ Context of the problem

I applied for an internship at a software development company and was invited for an interview. I passed the presentation to show off my basic programming and problem-solving skills. I have now been tasked with the more challenging task of creating a secure, fully functional application that has been developed using an IDE and complies with coding standards for a detailed business problem.

1.2 List out application’s requirements

At the request of the employer, I will create a fully functional, secure application that has been developed using the IDE and complies with coding standards for a detailed business problem. So I decided to create an app that would allow users to easily manage their bookstore sales and revenue statistics. In addition, my program is designed in the form of a window. The requirement of my application is to have all the basic functions of a management application and follow encryption standards. The application must allow users to enter inputs and perform specific CRUD (Add / Edit / Delete / Search) actions. The information of the book will have to be full of information such as Directory, Title, Author, Publisher, Amount and Price. Chapter 2 – Explain programming paradigms

2.1 Explain what is Procedural Programming with source code and illustrations

a) What is Procedural Programming? Procedural programming is a programming method that supports the breakdown of functions into several procedures. In procedural programming, a large program is divided into smaller, manageable parts called procedures or functions. Here, preference is given to functions over data. In a procedural programming language, a program basically consists of a series of commands, each of which will require the computer to do something such as reading input from the user, performing the necessary calculations, displaying the output.

  • Procedural languages follow structured programming practices and use block-based control flow rather than goto commands.

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

a) What is Object-Oriented Programming? Object-oriented programming (OOP) is a programming model based on the concept of class and object. It is used to structure a software program into simple, reusable parts of code blueprints (often called classes), which are used to create individual representations of objects. Picture 2 : Example about OOP b) The structure of Object-Oriented Programming

  • Classes are user-defined data types that serve as blueprints for individual objects, properties, and methods.
  • Objects are instances of a class created using specifically defined data. Objects can correspond to real-world objects or an abstract entity. When the class is originally defined, the description is the only object defined.
  • Methods are functions defined inside a class that describe the behaviors of an object. Each method included in the class definition begins with a reference to an instance object. Additionally, the subroutines contained in an object are called expression methods. Programmers use methods to reuse or keep functionality encapsulated within one object at a time.
  • Attributes are defined in the class template and represent the state of an object. The objects will have data stored in the property field. The properties of the class belong to the class itself. c) Key Features of Object-Oriented Programming
  • Packed: This principle states that all important information is contained inside an object and only a select number of information is revealed. The execution and status of each object are held privately inside a defined layer. Other objects do not have access to this class or permission to make changes. They can only call a list of functions or methods public. This data hiding feature provides greater program security and prevents unintended data corruption.
  • Abstraction: Objects reveal only internal mechanisms that are involved in the use of other objects, hiding any unnecessary implementation code. The derivative class can be extended its functionality. This concept can make it easier for developers to make changes or additions over time.
  • Inheritance: Classes can reuse code from other classes. Relationships and subclasses between objects can be assigned, allowing developers to reuse conventional logic while maintaining a single hierarchy. This nature of OOP forces more thorough data analysis, reducing development time and ensuring a higher level of accuracy.
  • Polymorphism: Objects are designed to share behaviors, and they can take many forms. The program determines what meaning or usage is needed for each execution of that object from a parent class, reducing the need to copy code. A subclass is then created, extending the functionality of the parent class. Polymorphism allows different types of objects to pass through the same interface. d) Advantages and disadvantages of Object-Oriented Programming → Advantages of Object-Oriented Programming:
  • The productivity of software development increases: Computer programs write in a measured way of arranging objects, as it eliminates obligations during object-based program development. It could also be expanded, as the articles could be stretched out to incorporate new qualities and practices. Items can also be reused inside and across apps. Due to these three variables – distinctiveness, scalability, and reusability – object positioning programming offers more usefulness for developed programming progress than conventional strategy-based programming methods.
  • Improved software maintenance: For the reasons mentioned above, object-oriented programming is also simpler to keep up with. Since the plan is segregated, part of the framework can be refreshed if problems arise without the need to implement large-scale improvements.
  • Faster improvements: Reuse allows for faster advancement. Object-locator programming dialects come with rich article libraries, and code generated in projects can also be reused in later projects.
  • Reduce development costs: The reuse of the program also reduces development costs. Often, more effort is put into the test and plan, which reduces the overall cost of improvement.
  • Good quality software: Faster programming improvements and lower improvement costs allow more time and assets to be used to validate products. Although quality depends on the experience of the teams, programming according to the audience position will generally result in better programming efficiency. → Disadvantages of Object-Oriented Programming:
  • Deep expectations to learn and adapt: The perspective of engaging in object positioning programming may not be normal for certain individuals, and it may invest in some opportunities to become familiar with it. It is very complicated to carry out programs from the point of view of the collaboration of articles. Part of important programming procedures, such as inheritance and polymorphism, can be examined for appreciation at first.
  • Larger program sizes: Programs that are arranged objects often include more lines of code than procedural projects.\nSlower projects: Programs that are arranged objects are often slower than procedural-based programs, as they often require more instructions to be executed.
  • Not suitable for many problems: There are problems that suggest that useful programming styles, reasonable programming styles, or strategy-based programming styles, and that applying object- aligned programming in those cases will not work for projects.

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

a) What is Event-Driven Programming?

  • Use hardware interrupts: It can be done using hardware interrupts, which will reduce the power usage of the computer.
  • Allows sensors and other hardware: It allows other sensors and hardware to easily interact with the software. → Disadvantages of Event-Driven Programming:
  • Complex: For simple programs, event-driven programming is often more complex and cumbersome than mass programming.
  • Less logical and clear: Program flows are often less logical and clear\n\nDifficult to find errors: Errors can be harder to detect than procedural, simpler programs.
  • Slower: Programs with complex GUI can load and run slower than simpler programs, especially if the RAM isn't enough.
  • Confusing: Programs with too many forms can be very confusing and/or annoying to users
  • Tight coupling: There can be a tight combination between the event schema and the consumer of the schema.
  • Blocking: It can become more difficult to argue about blocking activities.

2.4 Conclude which paradigms will be used to develop the application with explanation

In my program, I used procedural programming, object-oriented programming, and event-driven models as follows: → Procedural programming: I used the if statement to check the condition when the user entered the information. This makes the code simpler and easier to understand. → Object-oriented programming:\nI created two Books classes to reuse the code and reduce the line of code. These classes make it easy for me to develop more functions in the future. → Event-driven programming:\nI also used an event-driven program to design an overview of my app. Use some useful functions like clicking buttons, labels, text boxes to create a friendly interface that makes it easy for my app to understand how to work without training. Chapter 3 – IDE features

3.1 Introduce what is IDE

An Integrated Development Environment (IDE) is a software suite that consolidates the basic tools needed to write and test software. An IDE typically includes: → 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 autocomplete, and checking for errors when the code is being written. → Local Build Automation: Utilities that automate simple, repeatable tasks as part of creating a local build of software for developers to use, like compiling computer source code into binary code, packaging binary code, and running automated tests. → Debugger : A program to check other programs that can graphically show the location of an error in the original code. The benefits of IDE: → The IDE allows programmers to start coding new applications faster because different tools do not require to be built and connected separately in the initial setup.

→ Programmers don't have to invest hours researching different tools separately because every resource is displayed on the same desk. It's also valuable to train new programmers who can use the IDE to train themselves using conventional tools and processes. → IDE support themes are regularly upgraded, offering new templates, program design, and other features. Developers are learning and updating standard guidelines that benefit their organizations. It increases efficiency.\nMany IDE functions, such as smart code finishing and automated code production, are designed to save time by eliminating the need to write entire character patterns. → The IDE analyzes the script during import, enabling real-time detection of problems created by human error. → It also governs the production process, making it easy for developers to collaborate and recruit to get things done quickly. Picture 3 : IDE

3.2 Introduce features of IDE with illustrations

Common features of integrated development environments: → Text editor: Almost every IDE will have a text editor designed to write and manipulate source code. Some tools may have visual components for dragging and dropping UI components, but most have simple interfaces that highlight language-specific syntax. Picture 4 : Text editor → Debugger: Debugging tools that assist users in identifying and fixing errors in the source code. They often simulate real-world scenarios to test functionality and performance. Programmers and software engineers can often test different pieces of code and identify bugs before the application is released. Picture 5 : Debugger

  • Compiler: This is a program that translates the coding language into a usable format, which gives you the ability to debug the program. It can identify some errors in the code and come up with a solution, but you can require a debugging tool to solve them.
  • Variable: A variable that refers to how you can classify storage in the program's code. You can sort variables in the code to perform different actions, such as using one for a set of numbers to include it in a line of code.
  • Value: This word represents the specific name that you assign to a variable after you create it. The value for a set of numbers can be 'payroll information'.
  • Function: A function that describes how variables translate into actions in the program's code. The functions also allow a program to work in the way that software developers and engineers intended.
  • Breakpoints: When you use a compiler to execute program code, you can use breakpoints to stop running code in sections with previously defined errors. People often use breakpoints while investigating an exception or a similar event during debugging.
  • Input: This word refers to the coding language that instructs a program to complete a certain action or function. You can enter an encoding language into the compiler to see if the program works.
  • Output: This data represents the encrypted data that a program generates after you execute it using a compiler, and it often looks different from the input due to the way the functions in the code interact. People often debug a program to make the output reflect the expected data arrangement. Picture 7 : Debugging b) The benefits of debugging in the IDE Debugging allows software engineers and developers to fix bugs in the program before releasing them to the public. It's a process that complements the testing process, which involves learning how an error affects an overall program. If you test each piece of code, you can find out which variables and functions need to be adjusted systematically. Debugging can also improve the quality of the product, which can increase the number of positive reviews a company receives. c) The evaluation of the debugging process in the IDE When you're executing a program with errors, there are a few things you might want to do or know:
  • What command or expression is the program executing at the time of the fatal error?
  • If a fatal error occurs while executing a function, which line of the program contains that function call?
  • What is the value of program variables (including parameters) at a specific point during program execution?
  • What is the result of evaluating a particular expression at some point in the program?
  • What is the sequence of statements actually executed in a program?
  • These functions require that you be able to check the program data; to get a list of currently running functions; to establish breakpoints where the execution of the program is paused in order to allow the examination of the program's data; and go through the commands of a program to see what's really going on. Typically, the debugging process begins as soon as the code is written and continues in successive stages when the code is combined with other programming units to form a software product. In a large program with thousands and thousands of lines of code, the debugging process can be made easier by using strategies such as unit testing, code evaluation, and pair programming. To identify errors, it can be useful to view the logs of the code and use a standalone debugging tool or debug mode of an integrated development environment (IDE). It can be useful at this point if the developer is used to standard error messages. However, if developers don't comment adequately when writing code, even the cleanest code can be a challenge for someone to debug. In some cases, the module presents the problem as obvious, while the line of code itself is not. In that case, unit tests — such as JUnit and xUnit, which allow programmers to run a specific function with specific inputs — can be useful in debugging.\n\nStandard practice is to set up a 'breakpoint' and run the program until that break point, at which point program execution will stop. The debugger component of the IDE usually provides the programmer with the ability to view the memory and view variables, run the program to the next breakpoint, execute only the next line of code, and in some cases, change the value of the variables or even change the contents of the line of code that is about to be executed.

3.4 Evidences that you have used debugging during the implementation

In my program, I set up the error for debugging and saw how the debugger works: Picture 8 : Identify When the user enters the information of the book, the program I ask to enter Directory, Title, Author, Publisher, Amount, Price. After entering, my program stopped at line 89. Then, I used to try Debug to find the error.

→ Faster setup: Programmers need to spend time configuring multiple development tools without an on- premises IDE interface. By integrating the IDE, programmers can have the same set of capabilities in one place without having to constantly switch tools. → Faster development tasks: Tighter integration of development tasks means improved developer productivity. For example, developers can parse and check syntax while editing, which allows for instant feedback when syntax errors appear. Programmers no longer need to switch between applications to get the job done. In addition, IDE tools and features help programmers organize resources, prevent mistakes, and deploy shortcuts. For even more benefits, IDE can help restructure the development process by promoting comprehensive strategizing. They motivate programmers to think about their actions throughout the entire development lifecycle (SDLC), as opposed to a series of individual tasks. → Continuous learning: Another benefit is the ability to be up-to-date and educated. For example, IDE help topics are constantly updated, along with new templates, project templates, and more. Developers who are constantly learning and updating best practices are more likely to add value to their team and to the business, boosting productivity. → Standardization: It also regulates the development process, helps programmers work together seamlessly, and supports new hires to get up to speed so they can succeed. Chapter 4 – Design and Implementation

4.1 Flowchart of the application

a) Menu & option Picture 11 : Menu & Option

b) Add information of book In the Add function, as we see, when the user runs the program, my application will ask the user to enter the full information in the form. Once the import is complete, the user can click the Add button to store the information and display them in the on-screen list. If the user does not enter the value of Amount, Price, my program will display a warning message that the user needs to enter them. Picture 12 : btnAdd c) Edit information of book In the Edit function, the user needs to select 1 book to edit the information by clicking on the profile in the table. After that, the user needs to enter the new information and click the Edit button to finish. Finally, the list below will update later. Picture 13 : btnEdit d) Delete information of book

compare. If Folders or Authors matches, my program will display the profile search after searching on the screen so that the user can check the information again. Picture 16 : btnSearch g) Confirm order In the function search, the user first needs to enter Title, Amount, Price and click on the Cofirm button to perform the function. My program will bill below. If the number of books is no longer available, my program will notify the user that there are no longer enough books to sell. Picture 17 : btnConfirm

h) Caculate sales First, the user chooses the revenue statistics by Directory or the date of sale, then the program will find the information of the order and display the store revenue by clicking the Total button. After that, the table below will automatically update the information above and display it to the screen. Picture 18 : btnTotalUp

4.2 Source code and screenshots of the final application with explanation

To display the interface when the user runs the application, I have to determine the Initializecomponent () function to display the design. And I use the list<> to save the user information.