Docsity

Cinema Management Program: Function Overview and Implementation, Study Guides, Projects, Research of Programming Languages

Toggle sidebar
bg1
ASSIGNMENT 1 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
Nguyen Dinh Hoang Long
Student ID
GCH210216
Class
GCH1003
Assessor name
Do Hong Quan
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
Long Hoang
Grading grid
P1
M1
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32

Partial preview of the text

Download Cinema Management Program: Function Overview and Implementation and more Study Guides, Projects, Research Programming Languages in PDF only on Docsity!

ASSIGNMENT 1 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 Nguyen Dinh Hoang Long Student ID GCH

Class GCH1003 Assessor name Do Hong Quan

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 Long Hoang

Grading grid

P1 M1 D

Summative Feedback:Resubmission Feedback:

Grade: Assessor Signature: Date:

Lecturer Signature:

References

Anon., n.d. What is an Algorithm?. [Online] [Accessed November 2021]. Bhatia, S., 2021. Procedural Programming. [Online] Available at: https://hackr.io/blog/procedural-programming [Accessed 8 October 2021]. Bolton, D., 2021. Introduction to Functions in C#. [Online] Available at: https://www.thoughtco.com/introduction-to-functions-in-c- 958367 [Accessed 6 December 2021]. Chakraborty, A., 2021. geeksforgeeks. [Online] Available at: https://www.geeksforgeeks.org/how-c-sharp-code-gets-compiled-and-executed/ [Accessed 5 December 2021]. Codeasy, n.d. C# compilation process. [Online] Available at: https://codeasy.net/lesson/c_sharp_compilation_process [Accessed 5 December 2021]. DeepSource, n.d. Procedural Programming. [Online] Available at: https://deepsource.io/glossary/procedural-programming/ [Accessed 5 December 2021]. Parewa Labs, n.d. What is an Algorithm?. [Online] Available at: https://www.programiz.com/dsa/algorithm [Accessed 5 December 2021].

Figure 23: Search Genres Function Code Illustration .................................................................................................................................................. 45 Figure 24: Search Titles Function Code Illustration ..................................................................................................................................................... 46 Figure 25: Ranking Function Code ............................................................................................................................................................................... 47 Figure 26: Ranking Function Code ............................................................................................................................................................................... 48

1.Introduction:

  • At the moment, during the time I am attending my college’s Programming course – 1619 , I have recently applied for

a trainee position with a software development company. As part of my preparation for an interview, I plan to

demonstrate problem-solving and fundamental programming skills that I learned.

Figure 1 : Illustration of C#

( pic reference : https://comdy.vn/c-sharp/cac-tinh-nang-moi-cua-c-sharp- 7 - x/ )

1.2_Business Problem to be solved:

  • I will write a simple menu-based program to manage movies in a cinema for a cinema staff/manager with 4 main,

whenever an option is done, the user will return to the menu to proceed other options or to exit. The program

allows user to add movies to the list of movies that are in theater, see the movies with their information, search

movie based on its genre, rate movies.

Figure 3 : Illustration of Algorithm in Programming

( Pic reference : https://www.edrawsoft.com/algorithm-definition.html )

How algorithm helps in problem solving ( Computing in particular ):

  • Algorithm is essential, it helps us to not only solve our problems as well as many other possible issues but also

helps us to use resources efficiently.

o Write more efficient programs

o Solve complex issues

o Use resources wisely

o Write programs faster

  • Steps in Program Development:

o Analyzing the issue

▪ State out the problem need to be solved, what is your requirement, necessities to solve the problem

and what is the output of the problem solutions.

  • Requirement: functions, arrays, structures, variables, etc.

o Algorithm Development / Design

▪ Establish, build the architecture of the project , using a step-by-step procedure for solving the problem

using the specification provided in the previous phase so as to remove faults, bugs.

o Coding, Documenting

▪ In this stage, we will use a programming language to write the actual software to solve the problem.

o Testing, Debugging

▪ In this crucial phase, we will test the program if it is running functionally or not, whether the output is

desired or not. If there is any bugs, faults, we will need to fix them to reach the peak of customer

satisfaction.

o Maintenance

▪ Once all the previous steps have been well passed, bringing out the needed output, the

“Maintenance” stage comes, which is the phase where you/developer maintain the software and

update it from time to time to adapt future changes, needs. Then, the cycle of Program Development

continues when bugs appear or enhancements are needed.

Figure 4 : Illustration of Algorithm in Programming

Use-case diagram of the requirements : Figure 6 : Use-case diagram of the project

Details of the problem:

  • The Program to manage movies is made mainly for staffs and theater managers so it is a 1 sided program, there is

no Customer appearance, only Admin so no login is basically needed.

o The Program should have some basics functions including:

▪ Add movies to the program

  • Date of release
  • Director
  • Title
  • Genre
  • Rating
  • Etc …

▪ Search movies by Titles

▪ Search movies by Genres

▪ Ranking

2.2_Design the Solutions:

Definition of Functions: (University Of Utah, n.d)

Functions are "self-contained" blocks of code that perform a single task. Functions typically "take in," "process," and

"return" a result. Once a function is written, it can be reused indefinitely. Functions may be "called" from within other

functions.

Typical Function Definition Characteristics (Bolton, 2021)

  • Access level : public, private plus some others
  • Return value> : void or any type such as int
  • Method Name : SayHello
  • Any method parameters : none for now. These are defined in the brackets () after the method name

▪ Daodien

▪ Ten

▪ Subtitle

▪ Theloai

▪ Tc, hd, kd, hh ( Genres in short )

o Structures:

▪ Conditional Statements:

  • Switch…Case statements.
  • If statements

▪ Iteration Statements:

  • While statements
  • Do…While statements
  • For statements Procedural Programming Paradigm:

▪ 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. (DeepSource, n.d)

(pic reference : https://hackr.io/blog/procedural-programming )

▪ Key characteristics:

o Predefined functions : A predefined function is typically an instruction identified by a name. Usually, the

predefined functions are built into higher-level programming-language, but they are derived from the library

or the registry, rather than the program. (Bhatia, 2021)

o Local Variable : Local variables, also known as lexical variables, are variables that are defined within a

certain method and can only be used or referred within that method. As a result, their scope is limited to that

approach, and they cannot be used elsewhere ( Imam, n.d )

o Global Variable : A global variable is one that is declared outside of every other function in the code. As a

result, unlike local variables, global variables can be utilized in all functions..

o Modularity : When two dissimilar systems have two different goals at hand but are joined together to

complete a bigger task first, this is referred to as modularity. Each group of systems would then finish its

own jobs one by one until all tasks were completed. (Bhatia, 2021)

o Parameter Passing : Parameter passing is a technique that allows parameters to be sent to functions,

subroutines, or procedures. Passing parameters can be accomplished via 'pass by value,' 'pass by

reference,' 'pass by result,' 'pass by value-result,' and 'pass by the name.' (Bhatia, 2021)

1.Menu Flowchart:

  • This flowchart gives viewers the outline of how the program works.
  • When starting the program, the User/Cinema Staff/Manager will need to

choose 1 of the 6 options which are : Entering Movie’s info, Printing out the

stored Movie’s Information, Search entered movies based on their genres, titles’

keywords as well. If the user enter special characters from the keyboard or words

beside the required integer 1 to 6, the system will ask the user to re-enter until

the input is valid.

  • When an option finishes, the user can return to the menu to choose the

next operations as he/she desire.

  • When the user finishes his work, he can choose the “Exit” option to

shutdown the program.

_______________________________________________________________