Docsity

Programming 1618 ASM 2, Study Guides, Projects, Research of Programming Languages

Toggle sidebar
bg1
ASSIGNMENT 2 FRONT SHEET
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 Truong Duy Minh Student ID GCD210505
Class GED1102 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 Minh
Grading grid
P2 P3 P4 P5 M2 M3 M4 D2 D3 D4
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Programming 1618 ASM 2 and more Study Guides, Projects, Research Programming Languages 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 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Truong Duy Minh Student ID GCD Class GED1102 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 Minh Grading grid P2 P3 P4 P5 M2 M3 M4 D2 D3 D

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Table of Contents

I. INTRODUCTION TO PROGRAM

I.1 Introduce the Overview/ Context of the problem  Overview: I succeeded in the report 1 presentation to demonstrate my fundamental programming and issue-solving abilities. I've now been handed the more challenging task of developing a fully functional application. I submitted an application to work as a trainee for a software development company, and I was invited to an interview. The presentation will showcase your capacity for problem-solving and fundamental knowledge of programming. Now that I have been assigned a more difficult task to design a fully functional, secure application that was created with an IDE and complies with coding guidelines for a thorough business difficulty.  Context of the problem: Hotel Management System :  A Hotel Management System is a software built to handle all online hotel activities easily and safely.  This System will give the hotel management power and flexibility to manage the entire system from a single online portal.  The system allows the manager to keep track of all the available rooms in the system as well as to book rooms and generate bills.  The system should support the booking of different room types like standard, deluxe, family suite, etc. Guests should be able to search the room inventory and book any available room.

 The system should be able to retrieve information, such as who booked a particular room, or what rooms were booked

by a specific customer.

Figure 1 : A hotel management system I.2 List out application’s requirements  Users can view the room status as "Available" or "Unavailable" for each room, and the hotel also provides detailed information about the number of rooms, room type and room rate per hour.  User can easily choose because it is arranged in tabular style.  The user can then select any available room to use.  This program is also available to hotel employees. Hotel staff can view detailed information about the status of each room, detailed information about customers who have booked the room.  The program will automatically update and synchronize each time a guest makes a reservation.

II. EXPPLAIN PROGRAMMING PARADIGMS

II.1 Explain what is Procedural Programming with source code and illustrations

 DEFINITION:

 Procedural Programming may be the first programming paradigm that a new developer will learn. Fundamentally, the procedural code is the one that directly instructs a device on how to finish a task in logical steps. This paradigm uses a linear top-down approach and treats data and procedures as two

tasks are complete.  Parameter Passing: Parameter Passing is a mechanism used to pass parameters to functions, subroutines or procedures. Parameter Passing can be done through ‘pass by value’, ‘pass by reference’, ‘pass by result’, ‘pass by value- result’ and ‘pass by the name’. II.2 Explain what is Object-Oriented Programming with source code and illustrations

 DEFINITION:

 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. There are many object-oriented programming languages including JavaScript, C#, Java, and Python.  A class is an abstract blueprint used to create more specific, concrete objects. Classes often represent broad categories, like Student and Teacher that share attributes. These classes define what attributes an instance of this type will have, like activity, but not the value of those attributes for a specific object.  Classes can also contain functions, called methods available only to objects of that type. These functions are defined within the class and perform some action helpful to that specific type of object. (Anon., n.d.) II.3 Explain what is Event-Driven Programming with source code and illustrations  Event-driven programming is a paradigm where entities (objects, services, and so on) communicate indirectly by sending messages to one another through an intermediary. The messages are typically stored in a queue before being handled by the consumers.  Unlike in using direct calls, event-driven programming completely decouples the producer from the consumer, leading to some noteworthy benefits. For example, multiple producers and multiple consumers can all collaborate to process incoming requests. Retrying failed operations and maintaining an event history are also simplified. Event-driven programming also makes it easier to scale large systems, adding capacity simply by adding consumers.

Figure 5: Example of Event-driven Programming.............................................................................................................

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. II.4 Conclude which paradigms will be used to develop the application with explanation  The topic provided the tasks that I had to do, so it was easy to turn those tasks into each function in the program.  The ability to re-use the same code at different places in the program without copying it.  Its relative simplicity, and ease of implementation of compilers and interpreters  The ability to be strongly modular or structured.

 Only need a few memory

III. IDE FEATURES

III.1 Introduce what is IDE An integrated development environment (IDE) is software for building applications that combines common developer tools into a single graphical user interface (GUI). (Anon., n.d.). For example, Visual Studio is the most famous and effective IDE

Figure 5 : Visual Studio III.2 Introduce features of IDE with illustrations 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.

Figure 8 : ComplierCode 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 Figure 9 : Code completionProgramming 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.

Figure 10 : Solution explorerIntegrations 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 lead to many headaches. (Anon., n.d.) III.3 An explanation and evaluation of the debugging process in the IDE used and how it helped with development. To debug problems in your program, you will need to perform a few steps:  Step 1: Choose Debug on toolbar or press F10.

Evaluation of the debugging process in IDE

  • Error description: Attempt to extract as much information from the user as possible to determine the specific reason by showing the application for the user to submit the information.
  • Providing feedback to the software when an error occurs: Attempt to obtain all variable values and the program's state at that time, indicating which line of code contains the error.
  • Analyze images in terms of their condition and activity. As a consequence, try to pinpoint the cause of the error.
  • Correct current issues while also keeping an eye out for new ones.
  • The application is now suitable for use after the problem has been resolved. III.4 An evaluation of developing applications using an IDE versus developing an application without using an IDE. When it comes to security, we all know that fewer vulnerabilities in our software mean that the application will be more safe. In general, debugging is used to establish where problems happened, what type of problems occurred, and why the problems occurred. It also highlights any errors that may have happened throughout the coding process. As a consequence, if the errors are eradicated, our software will be able to handle difficulties exceptionally rapidly, and the security will be strengthened, resulting in the application being more powerful and safe in the process. Concerning the aforementioned issue, I am aware that my program becomes more efficient when there are less errors in it. Most of the time, debugging is used to establish where problems happened, what type of problem occurred, and why the problems occurred. It provides a detailed explanation of the issues, allowing us to swiftly resolve them with the help of the debugger's response, which we will examine next. It also highlights any potential errors that may have happened throughout the coding process. As a consequence, if the errors are eliminated, our application will be able to manage the issue extremely effectively, and the previous program will be enhanced, resulting in the program being more efficient right away.

IV. DISGN AND IMPLEMENTATION

Figure 14: Flowchart of the program..............................................................................................................................

Figure 13 : Flowchart of the program IV.2 Source code and screenshots of the final application with explanation