








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































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 Le Nguyen Quang Nam Student ID GCD Class GCD0905 Assessor name Nguyen Van Loi 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
Grade: Assessor Signature: Date: Lecturer Signature:
CHAPTER 1. INTRODUCTION TO THE PROGRAM (P3).
An online movie ticket booking system facilitates the purchasing of movie tickets to its customers. E-ticketing systems allow customers to browse through movies currently playing and book seats, anywhere and anytime. Each cinema can have multiple halls and each hall can run one movie show at a time. Each Movie will have multiple shows. Customers should be able to search movies by their title, genre, language, and release date. The customer should be able to select a show at a particular cinema and book their tickets.
To require the context of the problem above, I plan to create an application for customers to book tickets. Firstly, the application displays a menu that asks user to choose how to login include login as employee and login as customer. In login as employee, user have three options. Option one is adding films. It allows employee to input films’ information and add these films to the cinema. Option two is displaying films playing in the cinema that these film is added previously. Option three is backing to the main menu. In login as customer, users have eight options according the requirement of the problem include: 1. Showing list of movie. 2. Searching movies by title. 3. Searching movies by genre. 4. Searching movies by language. 5. Searching movies by release date. 6. Booking tickets. 7. Canceling booking tickets. 8. Backing to the menu.
In option 6 - booking tickets, customer must input the title of movie they would like to book. Then, they input their information like name and phone number. Finally, they choose the hall, date, showtime, and the number of tickets to finish booking tickets. In summary, my application meets the requirements of the problem that mentioned above. CHAPTER 2. EXPANATION OF PROGRAMMING PARADIGMS (P2).
Procedural programming is a programming paradigm built around the idea that programs are sequences of instructions to be executed. They focus heavily on splitting up programs into named sets of instructions called procedures, analogous to functions. A procedure can store local data that is not accessible from outside the procedure’s scope and can also access and modify global data variables. Figure 1. Paradigm of Procedural Programming. The characteristics of procedural programming are: Procedural programming follows a top-down approach. The program is divided into blocks of codes called functions, where each function performs a specific task. Procedural programs model real-world processes as 'procedures' operating on 'data'. The data and functions are detached from each other. The data moves freely in a program. It is easy to follow the logic of a program.
Figure 3. The output of calculating of odd number.
Object Oriented programming (OOP) is a programming paradigm that relies on the concept of classes and objects. It is used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which are used to create individual instances of objects. Figure 4. Paradigm of Object - Oriented Programming. There are four major characteristics in object-oriented programming that makes them different than non- OOP languages: Encapsulation - Encapsulation is capturing data and keeping it safely and securely from outside interfaces. Inheritance - This is the process by which a class can be derived from a base class with all features of base class and some of its own. This increases code reusability. Polymorphism - This is the ability to exist in various forms. For example an operator can be overloaded so as to add two integer numbers and two floats. Abstraction - The ability to represent data at a very conceptual level without any details.
An example of Object - Oriented Programming: Dog and Cat program. Figure 5. Source code of Dog and Cat program. The output:
Service-Oriented: Service-focused is a key feature in event-driven programming used to create programs created for services, and it does not slow down the computer. The service-oriented only take in little of the computer control vitality, and usually, services run in the backdrop of OS. Time-Driven: In motivated event programming, time influenced is a paradigm. From the code that runs on a period trigger, time motivated can be considered a specific code that works in a particular time, which could be once one hour, once a week, or once a month. This means from the pre-set to do the activity. For example, house windows revise is the exemplary case of time motivated, which individual can establish when to revise or when to check and download the revise. Trigger Functions: Trigger functions in event-driven coding are functions that decide on what code to perform whenever there is a specific event occurs. Programmers use these functions to select which event handler to use for the function when you can find specific event occurred. Events: Events include mouse, computer keyboard, and user interface, which events have to be triggered in this program. This means the user has to interact with an object in this program, for example, click a button by a mouse, use the computer keyboard to choose a button, etc. The Simplicity of Programming and Ease of Development: Event-driven programming is simple and much more straightforward to program than another kind of programming as it's very aesthetic. For example, you can place a button by selecting it and place it onto a form and write a code for this. Event-driven development is also easy for the user to place a pre-written code script into an existing application. It allows the user to pause the code while running. Which makes expanding using event- driven programming is easy. An example for Event-driven Programming: Calculate sum of two digits.
Figure 8. Source code of Calculate sum of two digits. The output:
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 compiling computer 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 10. Integrated Development Environment (IDE).
IDEs have been around for decades. From being merely a platform for debugging and testing purposes to an integrated piece of software that can be an extension of the developer, IDE's continue to evolve and change with time.
Here are some standard features of an IDE: Text editor: Virtually every IDE will have a text editor designed to write and manipulate source code. Some tools may have visual components to drag and drop front-end components, but most have a simple interface highlighting language-specific syntax. Debugger: Debugging tools assist users in identifying and remedying errors within source code. They often simulate real-world scenarios to test functionality and performance. Programmers and software engineers can usually test the various code segments and identify errors before the application is released. Compiler: Compilers are components that translate programming language into a form machines can process, such as binary code. The machine code is analyzed to ensure its accuracy. The compiler then parses and optimizes the code to optimize performance. Code completion: Code complete features assist programmers by intelligently identifying and inserting common code components. These features save developers time writing code and reduce the likelihood of typos and bugs. Programming language support: IDEs are typically specific to a single programming language, though several also offer multi-language support. As such, the first step is to figure out which languages you will be coding in and narrow your prospective IDE list down accordingly. Examples include Ruby, Python, and Java IDE tools. Integrations and plugins: With the name integrated development environment, it is no surprise that integrations need to be considered when looking at IDEs. Your IDE is your development portal, so incorporating all your other development tools will improve development workflows and productivity. Poor integrations can cause numerous issues and. Top 10 IDE software providers:
Definition and evaluation: Debugging is the process of detecting and removing of existing and potential errors (also called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash. To prevent incorrect operation of a software or system, debugging is used to find and resolve bugs or defects. When various subsystems or modules are tightly coupled, debugging becomes harder as any change in one module may cause more bugs to appear in another. Sometimes it takes more time to debug a program than to code it. IDE helping with development: Throughout the process of writing, creating, and testing software, developers employ a variety of tools. Text editors, code libraries, bug tracking software, compilers, and test platforms are among the most common development tools. A developer who does not use an IDE has to choose, deploy, integrate, and monitor these tools individually. An integrated development environment combines several of these development-related technologies into a single framework. When all utilities are represented on the same workbench, developers don't have to spend hours learning how to operate them separately. This is also handy for new developers who may use an IDE to learn about a team's standard tools and practices. Most IDE capabilities, such as intelligent code completion and automatic code creation, are designed to save time by eliminating writing out complete character sequences. The integrated toolset aims to make software development easier while also detecting and reducing code errors and typos. Other popular IDE features assist developers in streamlining their workflow and problem-solving. IDEs parse code as it is written, identifying problems caused in real time. Most IDEs also include syntax highlighting, which employs visual clues to discern grammar in the text editor. CHAPTER 4. DESIGN AND IMPLEMENTATION (P3 - P5).
Use-case diagram for the user.
Figure 12. Use-case diagram for the user.