Assignment Cover Sheet Qualification Module Number and Title
Assignment Cover Sheet Qualification Module Number and Title
22.06.2021 27.08.2021
Assessment type Duration/Length of Weighting of Assessment
Assessment Type
Report and Software
Coursework Submission 100%
(3000 words)
Learner declaration
I, ISURU MANOD(KD/HDCSE/CMU/54/06) certify that the work submitted for this assignment is
my own and research sources are fully acknowledged.
Marks Awarded
First assessor
IV marks
Agreed grade
1
FEEDBACK FORM
INTERNATIONAL COLLEGE OF BUSINESS & TECHNOLOGY
Student :
Assessor :
Assignment : FIP
Marks Awarded:
2
Introduction
Depending on the system, this is primarily user authentication, since user authentication helps
protect the user's privacy. Users have to log in to the system using their username and password.
Once the username and password are entered correctly, the user can enter the system. If it is
entered incorrectly, it will not be able to enter the system .The customer must have a unique
username and password when we add new customers to the system. The username and password
should be accessible to them after all steps have been completed. This allows them to view and
add products and packages.
3
Task 1
Managing the software development process is called the "programming process". We do not
understand the language we use in everyday computer conversations. Therefore, we do not
understand the binary language used to perform tasks on a computer, so we need to write
instructions in a specially defined language such as C ++. C ++ is similar to natural language and
can be understood by a computer after it has been consistently translated.
1. Controlling structures
1.Selection structures
2.Repitition structures
3.Sequence Structure
4
1.1 Selection structures
C ++ programs are systematic selection structures based on conditional expressions. The
selection structure is the type of control structure used to select an instruction or series of
instructions to be executed under certain conditions. The program instructions are written in a
simple order, but the selection structure is also called the decision structure and the conditional
structure. There are three ways to make a decision in the selection structure:
1. IF Statement
2. IF ELSE Statement
3. Nested ELSE IF
5. Switch Case
5
1.1.1 IF Statement
In this declaration, the user specifies a condition, if the condition is true, the program will take
action, and if the condition is false, the program will continue or run. One of the important
functions of an If statement is to allow a program to choose an action based on user input.
Whether the condition is called one-way or one-way because it chooses or skips an action.
[ CITATION tut16 \l 1033 ]
OUTPUT
6
1.1.2 IF ELSE Statement
“If/ else the user receives a condition of the "If/ elset ype. In a If/ else selection structure, if the
condition is true, then in the if block the program is executed or if the condition is false. , the
program runs in another block. It is also known as bi-directional design or dual choice design
because it chooses between two different actions at the same timeThis Control Structure allows a
program to follow alternative paths of execution, whether a condition is met or not.”[ CITATION Die20 \l
1033 ]
OUTPUT
a is not less than 20;
value of a is : 100 [ CITATION tut16 \l 1033 ]
7
1.1.3 Nested ELSE IF
“A nested if is an if statement that is the target of another if statement. Nested if statements means an if
statement inside another if statement. Yes, C++ allows us to nest if statements within if statements. i.e, we
can place an if statement inside another if statement. ”[ CITATION you18 \l 1033 ]
Output:
i is smaller than 15
i is smaller than 12 too
8
1.1.4 Conditioned Operators
“The conditional operator is an operator used in C and C++ (as well as other languages, such as C#).
The ?: operator returns one of two values depending on the result of an expression.”[ CITATION pro18 \l
1033 ]
Output
9
1.1.5 Switch Case
“The switch case statement is used when we have multiple conditions and we need to take another action
based on the condition. When we have several conditions, and we need to execute a block of statements
when a certain condition is met. In this case, we can use a Long if statement .elseif or a case switch. The
problem with long if..else if is that it gets more complicated when we have a lot of conditions. Switch
housings are a clean and efficient way to deal with these situations..”[ CITATION jav20 \l 1033 ]
Output
10
1.2. Repetition structures
The Repitition constructs is used when a program needs to repeat one or more instructions. When
a condition is encountered during iteration, the loop ends at that point. In addition, the Repetition
construct is used to execute the loop. The programmer can enter a large amount of data into the
program using a limited number of variables.
1. while structure
2. for structure
3. do-while structure
11
1.2.1 While structure
“while loop statement executes the target statement repeatedly as long as the given condition is
true. And the programmer can create an infinite loop with the while loop. In the while loop, first
test the while loop to see whether the program being executed is true.”[ CITATION dev20 \l 1033 ]
Output
12
1.2.2 For structure
“A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute
a specific number of times. In a for loop, the initial statement first initializes the variable. Then, if the
loop condition is true, the original statement has been executed and the for loop statement is executed, the
statement is updated and repeated until the condition becomes false.”[ CITATION csu18 \l 1033 ]
OUTPUT
value of a: 10
value of a: 11
value of a: 12
value of a: 13
13
1.2.3Do-while structure
“In do while loop also the loop execution is terminated on the basis of test condition. The main difference
between do while loop and while loop is in do while loop the condition is tested at the end of loop body,
i.e. do while loop is exit controlled whereas the other two loops are entry controlled loops.” [ CITATION
tut16 \l 1033 ]
Output:
1 , 2 , 3 ,4 ,5
14
1.3. Sequence Structure
A sequential governance structure is the simplest of the three basic governance structures and is
the most common type of governance structure. This structure allows the computer to process
instructions one at a time.[ CITATION edu20 \l 1033 ]
15
1.4 Modularization
“The concept of modular programming originated in the 1960s to help users. Programmers began to
divide the more extensive programs into smaller parts. Though the concept of modular programming is
six decades old, it is the most convenient programming method.”[ CITATION jav20 \l 1033 ]
“The main program must establish the existence of functions used in that program. Depending on the
programming language, there is a formal way to ”[ CITATION Ken15 \l 1033 ]
1.define a function
2.call a function
“Functions are important because they allow us to take large complicated programs and to divide them
into smaller manageable pieces.” [ CITATION Ken15 \l 1033 ]
Functions included at the top of a C++ Program that already have a definition for itself are called Library
Functions. When these functions are inserted to the C++ program, we use “include<filename>”. Below
are some of the examples for Library Functions.[ CITATION you18 \l 1033 ]
2. User-defined Functions
A custom function is a function that is declared and defined by the user himself. When we write a
program, if there are no library functions available to accomplish a specific task, we write our own
function to perform that task. An example of a custom function as a main function. [ CITATION you18 \l
1033 ]
16
TASK 2
2. Flow Charts
2.1 Main
17
This is the main function of this application. Here are three different options for users. Through it, the
user can enter the "Login" option, the "Help" option or the "Exit" option by entering the corresponding
number provided by the system.
If Number = 1
18
When the user enters a number, and if the number is 1, the condition will be true. When the
condition is true, the user can log in.
If Number = 2
When the user enters a number and if the number is 2, the condition will be true. When the
condition is true, then the user can read the "HELP" option provided by the program.
If Number = 3
When the user enters a number and if the number is 3, then the condition will be true when the
condition is true and the user can exit the program.
2.2 Login
19
This is the "Login" function of this program. The user can log in by entering a valid username and
password.
20
2.3 Main Menu
21
This is the main menu of this program. Here the user can select the category that the user is looking for.
In addition, when finished, the user can log off.
If Number = 1
When the user enters a number and if the number is 1, the condition will be true When the
condition is true and then the user can go to manage the bakery categories
If Number = 2
When the user enters a number, and if the number is 2, the condition will be true. When the
condition is true, the user can go to the management of the category "Dessert".
If Number = 3
When the user enters a number and if the number is 3, the condition will be true. When the
condition is true and then the user can go to manage the beverage category
If Number = 4
When the user enters a number and if the number is 4, the condition will be true. When the
condition is true, and then the user can go to manage the categories Events Packages
If Number = 5
When the user enters a number and if the number is 5, the condition will be true. When the
condition is true, then the user can log out. programs.
22
2.4 Bakery Products
It is a function of this baked goods program where the user can view all available baked goods records
and the option to add a new baked goods record to the program. Also, when done, the user can choose to
return to the menu.
23
2.5 Dessert
This is the Dessert function of this program. Here the user can see all available dessert records and the
ability to add a new dessert record to the program. In addition, when the user is finished, he has the option
to return the menu.
24
2.6 Beverages
This is the function of the drinks in this program. Here the user can see all available beverage records and
the ability to add new beverage records to the program. In addition, when the user is finished, he has the
option to return to the menu.
25
2.7 Packages
This is the function of the package of this program, here the user can see all available records of
packages, their details, as well as add a new package record to the program. The ability for users to search
for the packages they are looking for. In addition, when the user is finished, he has the option to return to
the menu.
26
TASK 4
4.2 Login
TEST CASE TEST TEST DATA EXPECTED ACTUAL CONCLUSION
ID OBJECTIVE RESULT RESULT
4.3 Menu
27
TEST CASE TEST TEST DATA EXPECTED ACTUAL CONCLUSION
ID OBJECTIVE RESULT RESULT
28
TEST CASE TEST TEST DATA EXPECTED ACTUAL CONCLUSION
ID OBJECTIVE RESULT RESULT
4.5 Desserts
29
TEST CASE TEST TEST DATA EXPECTED ACTUAL CONCLUSION
ID OBJECTIVE RESULT RESULT
4.6 Beverages
30
TEST CASE TEST TEST DATA EXPECTED ACTUAL CONCLUSION
ID OBJECTIVE RESULT RESULT
31
TEST CASE TEST TEST DATA EXPECTED ACTUAL CONCLUSION
ID OBJECTIVE RESULT RESULT
References
32
Beal, V., 1996. object-oriented-programming-oop/. [Online]
Available at: https://www.webopedia.com/definitions/object-oriented-programming-oop/
[Accessed 20 08 2021].
33
34