Professional Documents
Culture Documents
ASSIGNMENT BRIEF
Bachelor’s Degree Year 2 IT
The student must fill the relevant parts of the following table.
Student Last Student Task
Student First Name Name ID No. Date submitted Date issued
Hussain Riyaz 5201 1 19.10.2022 July 2022
Statement of authenticity
I, the above-named student, hereby confirm that this assignment is my own work and not copied or plagiarized.
It has not previously been submitted as part of any assessment. All the sources, from which information has been
obtained for this assignment, have been referenced in the Harvard format. I further confirm that I have read and
understood the Maldives Business School rules and regulations about plagiarism and copying and agree to be
bound by them.
Statement of Grades:
Marks Representative Grade Grade Interpretation
85 & Above A* Higher Distinction
75 to 84 A Distinction
65 to 74 B Merit
50 to 64 C Pass
Below 50 F Fail
Page 1 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Object Oriented Programming
Hussain Riyaz
BIT/Bachelor of Information Technology
Maldives Business School
19th October 2022
3596 words
Abstract
This report identifies the basic concepts of OOP, and gives an overview of the features of object-oriented
programming, shows the object-oriented languages and environments. OOP helps us make an informed decision
in programming.
Page 2 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
TABLE OF CONTENTS
Page 3 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Introduction
Many Programmers has revealed that it makes a program easier to comprehend if they were able to take a bunch
of data and group it together with the functions. This kind of grouping data and functions is known as class and
object. Scripting programs by using classes is object-oriented programming
SCENARIO
You work as an application developer in a company. A client has approached your company and asked
your manager if your company could develop an employee management for his company. So, the
manager has asked you develop an OOP solution for the client.
You are supposed to develop a small application, which accepts employee no., employee name,
department, designation, basic salary and displays the following details as output:
• Emp No
• Emp Name
• Department
• Designation
• Calculated Professional Allowance
• Calculated House Rent Allowance
• Calculated Provident Fund Allowance
• Calculated Travel Allowance
• Calculated Gross Salary
Calculations
You may assume that the values, for your reference a sample table with details is given below:
House Provident
Professional Travel Gross
Emp Emp Basic Rent Fund
Department Designation Allowence Allowence Salary
No Name Salary Allowence Allowence
(PA) (TA) (GS)
(HRA) (PFA)
Hussain
100 IT Inspector 120000 3000 1800 900 1800 15900
Riyaz
Mohamed
101 HR Sergeant 8000 2000 1200 600 1200 10600
Azim
Isham
102 IA Corporal 7000 1750 1050 525 1050 9275
Hameed
Aishath Sub
103 FCP 10000 2500 1500 750 1500 13250
Suzy Inspector
Page 4 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
REQUIRED
You are required to design and test an OOP solution. You are also required to prepare a test document on
it.
TASK 1: SOLUTION
Design and implement an OOP solution, test it, prepare a report on it titled “Designing and testing an
OOP solution.” In your report you must explain the control structures, objects, structures needed for
the design. Include in your report the test document you prepared and diagrams and pictures for the
purpose of illustration. It must not exceed 3,500 words.
The test document format is given below.
1. OOP test document
1. Objectives of the test document
2. Test planning
i. Test name
ii. Test date
iii. Expected results
iv. Actual results
v. Status
3. Test environment
4. Tools used to design and execute the test
5. Deliverables: Test results
Question 1
1. Critically review and test an object orientated programming solution. (3.1)
(12.5 Marks)
a. Critically review and test the OOP solution.
b. Prepare a test document.
Object-oriented programming is a programming standard that provides a way of structuring programs so that
properties and behaviors are bundled into individual objects.
Class
-Dog
Attributes
-height
-weight
-food
Dog Objects
-Name
Methods
-Run
-Plat
-Eat
Page 5 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Four Principles of OOP
• Inheritance: child classes inherit data and behaviors from parent class
• Encapsulation: containing information in an object, exposing only selected information
• Abstraction: only exposing high level public methods for accessing an object
• Polymorphism: many methods can do the same task
Advantages of OOP
• Being faster and easier to execute;
• Providing a clear structure for a program;
• Making code easier to modify, debug and maintain; and
• Making it easier to reuse code.
The following tests were thoroughly carried out on the program. The table shows the test objectives, date of the
test, environment which the test was carried out, expected results and actual results.
Test Document
Test
Objectives of
Test Expected Actual environ
S.No the test Test Name Tools used Test results
Date results results ment
document
SN01 Check if the Startup 15.10.22 Loads the Loads the PC IDLE Shell Loads to the input screen of
program runs Test input input 3.10.4 the program when the
screen screen module is run or pressed F5
SN02 Check if the Input Input Test 15.10.22 All the All the PC IDLE Shell All the input were entered
is functioning well inputs inputs 3.10.4 successfully
functions functions
good good
SN03 Check if the Input Input Test 15.10.22 All the All the PC IDLE Shell All the string inputs
is excepting at different inputs string inputs 3.10.4 excepted numbers as inputs
strings or integers fields should excepted from the user
except only integer
related type values
of inputs
SN04 Check the Calculation 15.10.22 All the Calculation PC IDLE Shell Professional allowance,
calculations are Test 1 calculations s were 3.10.4 House rent allowance,
correct to be calculated Travel allowance,
Net salary,
correct correctly Provident fund and
Gross salary was calculated
accurately to the given
percentages
SN05 Check the Calculation 15.10.22 All the Calculation PC IDLE Shell Professional allowance,
calculations are Test 2 calculations s were 3.10.4 House rent allowance,
correct to be calculated Travel allowance,
Net salary,
correct correctly Provident fund and
Gross salary was calculated
accurately to the given
percentages
Page 6 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Below are the Screen Shots of the Calculations tests carried out. As you can see the Results are same as the
reference table above proving that the coding of the calculations is correct.
In the below screenshot we can see that the String inputs accepted numbers as inputs. This issue needs to be
attended by the programmer.
Page 7 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
The Below screenshot shows that integer inputs does not except strings as input. It is functioning the way
intended.
Question 2
2. Critically evaluate the environmental flexibility of programming (3.2)
(12.5 Marks)
a. Platform Independence
• Program independence
Program independence means that the software can run on a range of hardware platforms or software
architectures, requiring less planning and translation. For example, the Java programming language was designed
to run on multiple types of hardware and multiple operating systems. Groups with different types of computers
and devices will be able to write a specialized application once and have it be used by everyone, rather than
writing, distributing and maintaining multiple versions of the same program.
Java is a versatile and powerful programming language that can be used for developing a wide range of
applications. It is platform-independent, which means it can be run on any platform, including Android and iOS.
An important note regarding iOS is that there is no Java Virtual Machine running on iPhones. However, you can
bypass this limitation by compiling the Java input to the Objective-C code.
• Widespread popularity
o Most popular among the coders’ community which means that you have a chance to offshore the
entire Java development team and have a great selection of specialists to choose from.
IoT device embedded system is a combination of hardware and firmware with internet connectivity to perform
specific tasks. These devices transfer real-time data over the internet for a broader use case like monitoring,
tracking, analyzing, or more. Some of them are programmable or have fixed functionality. Examples include cars,
smartphones, industrial machines and medical equipment.
Standalone embedded systems do not rely on a separate host system. They perform a specialized task and isn’t a
part of a larger computing system. Examples include digital wristwatches and home appliances.
Real-time embedded systems provide a required output at predetermined time intervals, like a traffic control
system.
Analog to Digital to
Sensor Processor Actuator
digital analog
Converter converter
Memory
There are three types of error that can occur when developing programs:
• Syntax errors
o A syntax error occurs when the code given does not follow the syntax rules of the programming
language. Like:
▪ misspelling a statement
▪ using a variable before it has been declared
▪ missing brackets
• Logic errors
o A logic error is an error in the way a program should function. The program can run but does not
do what it is supposed to do.
o Logic errors can be caused by the programmer:
▪ incorrectly using logical operators
Page 9 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
▪ incorrectly using Boolean operators
▪ unintentionally creating a situation where an infinite loop may occur
▪ incorrectly using brackets in calculations
▪ using incorrect program design
• Runtime errors
o A runtime error is an error that takes place during the running of a program.
o For example, writing a program that attempts to access the sixth item in an array that only
contains five items. A runtime error is probably going to crash the program.
Question 3
3. Create onscreen help to assist the users of a computer program. (4.1) (12.5 Marks)
a. Identify the necessary needs to create onscreen help to assist the users to use the designed OOP
solution.
• Satisfied users
o The end-user experience is more successful when you have high-quality pictorial manuals. Poor or
dull user manuals will isolate the users, inadequate on-line help wastes a user's valuable time and
support that is not available immediately will frustrate your customers. As a result, your software
brand suffers.
• Longevity
o Your products will attain durability. Clearly written instructions along with onscreen
interpretations can prevent customer errors and make business processes more reliable. The
sooner your customer gains benefit from your product the longer they will use it and not be
hindered by it. As a result, your software brand profits.
b. Create onscreen help to assist the users to use the designed OOP solution.
This Onscreen Help Documentation is intended to assist the first time users of the OOP solution. For the OOP
solution to run on a Microsoft Windows 10 OS we will need to install python 3.10 for windows x64 bit.
Open the official Python website in your web browser. Navigate to the Downloads tab for Windows.
Choose the latest Python 3 release. In our example, we choose the latest Python 3.10 version.
Click on the link to download Windows x86 executable installer if you are using a 32-bit installer. In case your
Windows installation is a 64-bit system, then download Windows x86-64 executable installer.
Page 10 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Step 2: Run the Executable Installer
3. Select Customize installation. Choose the optional features by checking the following check boxes:
4. Documentation
5. pip
6. tcl/tk and IDLE (to install tkinter and IDLE)
7. Python test suite (to install the standard library test suite of Python)
8. Install the global launcher for `.py` files. This makes it easier to start Python
9. Install for all users.
Page 11 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
10. Click Next.
11. This takes you to Advanced Options available during the installation of Python. Select the Install for all
users and Add Python to environment variables check boxes. Or you can select the Associate files with
Python, Create shortcuts for installed applications and other advanced options. After selecting the
advanced options, click Install to start installation.
12. After the installation is over, you will see a Python Setup Successful window.
Page 12 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Step 3: Verify the Python Installation
You have now successfully installed Python 3.10.8 on Windows 10. You can verify if the Python installation is
successful either through the command line or through the IDLE app that gets installed along with the installation.
Search for the command prompt and type “python”. You can see that Python 3.10.8 is successfully installed.
Another way to search for python is from the start menu. Enter “Python” in the start menu and clicking on IDLE
(Python 3.1.8 64-bit).
Page 13 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Step 3. The IDLE 3.10(64-bit) will open the python file to show the coding of the program. As in the below
screenshot.
Step 4. To run the program press “Run” tab then select “Run Module”. (Shortcut: F5)
Step 5. You will be taken to an IDLE Shell 3.10.8 window, where you should enter the relevant
information regarding the employee. (An example is shown below)
Page 14 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Step 6. After entering all the information and press enter key, the program will calculate the following
o PROFESSIONAL ALLOW (PA) = 25% of Basic,
o HOUSE RENT ALLOW (HRA) = 15% of Basic,
o PROVIDENT FUND (PF) = 12% of Basic,
o TRAVEL ALLOW (TA) = 7.50% of Basic.
o Net Pay = Basic + PA + HRA + TA
o Gross Salary = Net Pay - PF
• Then the following results are displayed (as shown in the figure below)
o Emp No
o Emp Name
o Department
o Designation
o Calculated Professional Allowance
o Calculated House Rent Allowance
o Calculated Provident Fund Allowance
o Calculated Travel Allowance
o Calculated Gross Salary
Page 15 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Step 7. If you need to change any values from the calculations, please contact our company hotline or
send a mail regarding the issue.
Step 8. To do the calculations for another employee restart from Step 4 of Part 2 (Running the OOP
Solution)
Please reach out if you need any assistance. Thank you for using our program.
Question 4
4. Create documentation for the support and maintenance of a computer program. (4.2)
(12.5 Marks)
a. Identify following needs to create documentation for the support and maintenance:
i. Install tool
The following instructions explains how to install Python 3 on a Windows Computer
Page 16 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
iii. Code
1. The client wants to add new feathers in the program
2. The code is modified according to the client requests
3. The new program is handed over to the client
4. The client updates the old version of the program
b. Create documentation for the support and maintenance of designed OOP solution.
Maintenance and Support Documentation includes System Maintenance Plans, System Log Book, Monthly
Maintenance and Activity Reports, Root Cause and Resolution Reports, and Design Documents.
The client has asked to modify our program so that it is more user friendly and make a GUI for the program. The
following documentation is for the new Graphic User Interface of the Program.
Intended Audience:
Page 17 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Purpose of Program Modification
Clint needed a The New version of the Program will be user friendly and is open for more modification in the
future.
Technical Details
The new program was built using Python and the PySimpleGUI package.
------------------------------------------------------------------------------------------------------------------------------------------------------
As this is a small program I have mentioned only 2 types of documentations. There are many more types of
documentations that is required for a larger program. Some of the documentations include:
• Planning documentation.
• Estimate documentation.
• Standards documentation.
• Metrics documentation.
• Scheduling documentation.
• System documentation.
Page 18 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT
Conclusion and recommendations
In preparation of this report I have gained a deeper understating of object-oriented programing concepts. It
makes the coding easier and understandable for the programmer. I have made an OOP solution for the scenario
and modified the program later according to the client. Onscreen help and related documentations are also
included.
References
• https://www.freecodecamp.org/news/what-is-object-oriented-programming/
• https://www.python.org/
• Python for Dummies 1st Edition
Page 19 Object Oriented Programming Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 2 IT