0% found this document useful (0 votes)
109 views

TCP1101 Assignment PDF

The document describes a proposed automated menu system for processing student data in universities. It outlines the problem of manually processing large amounts of student data and proposes an automated solution. The system would allow loading student data from a CSV file, performing calculations on the data like minimum, maximum, mean, and generating outputs like histograms and correlation analyses. It would handle errors, store results in text files, and generate HTML reports. The document discusses the design of the main and sub-menus to guide users through the available options and outputs. A structured chart outlines the overall flow and subcomponents of the menu-driven program.

Uploaded by

Blackk Worldz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

TCP1101 Assignment PDF

The document describes a proposed automated menu system for processing student data in universities. It outlines the problem of manually processing large amounts of student data and proposes an automated solution. The system would allow loading student data from a CSV file, performing calculations on the data like minimum, maximum, mean, and generating outputs like histograms and correlation analyses. It would handle errors, store results in text files, and generate HTML reports. The document discusses the design of the main and sub-menus to guide users through the available options and outputs. A structured chart outlines the overall flow and subcomponents of the menu-driven program.

Uploaded by

Blackk Worldz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Faculty of Computing and Informatics (FCI)

Multimedia University
Cyberjaya

TCP1101 - Programming Fundamentals

Trimester 1, 2020/2021

Lecture Session: TC03


Tutorial Session: TT08 & TT09
Group Name: Tron

Assignment Part 1

Group Members:

Name Phone Number Email

Quinito Norman Octaviano 0123131040 [email protected]

Mohammed Osama Ismail Al Hindi 01139904607 [email protected]

Fam Yao Deng 01118710828 [email protected]

Fatema Tuj Johra +8801408-267338 [email protected]


Table of Contents

Problem statement 3

Functional requirements 4

The menu system: design and motivation 6

Structured chart for the system subcomponents 8

Algorithms and proper explanation for the computations used 9

2
Problem statement
(By Quinito Norman Octaviano)

Organizing and processing data in a large organization such as a university is difficult


and time consuming. Thousands of students take part in quizzes and tests as the semester
carries on, and their results are noted down by their respective lecturers to be stored in some
form of a database for future reference or usage.
Processing students’ data is an unavoidable labour for places of education, and it is
not only mentally and physically taxing on the person responsible for the job, it can also
cause health problems if done for extended periods of time. While a handful of individuals do
not mind its repetitive nature, most will clearly want to do less for the same outcome.
We propose an automated approach is suitable. An automated menu system that not
only takes the data of students and performs wanted computations. This menu system
requires very little human interaction, thus eliminating the need to waste copious amounts of
time into computing each and every row or column of data. Such a solution would require
many features in order to solve the problem:
● Allows the user to load data from a csv file.
● Should respond to any wrong input by the user with a proper error message and
should never crash.
● Should be able to calculate the following of a column and displayed in table form
with appropriate table headings: ​Minimum, Maximum, Median, Mean, Variance
and Standard Deviation.
● Display the distinct numbers and a count of the occurrences of each number in a table
form.
● Generate a histogram in text form.
● Display two tables with the data items above and below the mean and the number of
those below and above the mean.
● Calculate the Pearson’s correlation between any two selected columns.
● Calculate the linear regression line formula for a user selected column or columns of
the data.
● Display and store data in ascending or descending order for a selected column.
● Automatically generate a statistical report that includes all the computed values
mentioned above, appropriately formatted and stored in a text file.
● Generate an html document of the report that can be viewed in a browser.

3
Functional requirements
(By Fatema Tuj Johra)

1. Data input and reading.

>>The input file must be in “.csv” format, otherwise it will show an error.

2. On the menu system, it is able to choose a subject and output it’s marks. It also catches any
wrong inputs by the user.

>>On the menu system, there will be options for the user to select the subject according
student ID and age and show it’s marks individually.
E.g: Load data, view per subject, compare subject, exit. Inside every option there will be
more options for the user to choose from.

3. For each subject, need to use the following functions to figure out:
a. Minimum
b. Maximum
c. Median
d. Mean
e. Variance
f. Standard Deviation

>>​Minimum​: This function will figure out the minimum marks among all the students.

>>​Maximum​: This function will figure out the maximum marks among all the students.

>>​Median​: This function will figure out the median value (middle position).
E.g: If there are 5 numbers. It will show the middle on which means the 3rd number. If there
are 6 numbers it will add the 3rd and 4th number, then subtract 1 before dividing by 2.

>>​Mean​: This function will calculate the average among all student’s marks by following
formula:
Sum of all student’s marks / Sum of all students

>>​Variance: ​Variance is basically the squared value of Standard Deviation, so the function
will work by calling the function to calculate Standard Deviation, passing the same
parameters to it, and then squaring the value returned.

4
>>​Standard Deviation: ​Standard Deviation is mainly the square root of the variance, so
that’s how the function will work. It will calculate a quantity expressing how much members
of the group differ from the mean value for the group.

4. For any 2 chosen subjects, need to use the following functions to figure out:
a. Pearson’s Correlation
b. Linear Regression

>>​Pearson’s Correlation​: The function will calculate the correlation coefficient of any 2
subjects chosen by the user. The function will calculate the sum total of values of both
subjects, the product of all rows and its sum, the squared value of each row and its total sum
for one subject. The following will be used towards the formula to be used for the calculation.

>>​Linear Regression​: This function will calculate the linear regression of any 2 subjects
chosen by the user. The function will calculate the sum total of values of both subjects, the
product of all rows and its sum, the squared value of each row and its total sum for one
subject. The following will be used towards the formula to be used for the calculation.

5. The calculated results can be presented into the following using a function and be
displayed in a two-column table format with appropriate column headings.
a. Frequency table
b. Histogram
c. Pass/Fail (above or below mean)

>>​Frequency Table​: This function will show how many times each mark will occur E.g:
The number of students who got 67 marks is 4.

>>​Histogram​: This function will display the number of students whose marks are between a
given range.
E.g: The number of students who got between 60-70 marks is 4
(output shown >> 60-70 ​| ​ **** )

>>​Above/Below Mean: ​This will display the students who got above or below the calculated
mean for the chosen subject

6. The menu system is able to display all the data that has been calculated and stored in a text
file

5
The menu system: design and motivation
(By Fam Yao Deng)

6
We will have 2 menus inside the system which is a main menu and a sub menu for
calculation. First,the system will have 5 options to choose, load data, view by subject,
compare subject,overall report and exit. Next, if load data has been chosen, the system will
ask for the name for the file, and if it enters the wrong file name, it will repeat and ask for the
input again until a valid file name has been entered. Next, after it gains access to the csv file,
it will go to store all the data from the csv file into several arrays so it can calculate and print
the data.
After that, in view by subject, it will go to a sub menu that will show list of subjects
and ask for the input for which subjects to choose, then after it received the input, it will show
9 options, which are min, max, mean , median , variance, and standard deviation, histogram,
marks frequency distribution and above or below mean. Users can choose one of the options,
so that the system will be able to calculate the data stored inside arrays.After calculating the
data, it will be saved inside a txt file.
If a user chooses to compare 2 subjects, the system will ask the input for subject 1 and
subject 2. Then, the user will need to choose between pearson’s correlation and linear
regression , and the system will perform the selected option,calculating the data and store it
data in a file. Next,if the user wishes to display all the data stored,they can select the fourth
option which is overall report. Finally, the user can quit the system and all the data will not be
lost since the data is already stored in the files.

7
Structured chart for the system subcomponents
(By Mohammed Al Hindi)

This structured chart shows the flow of the Menu Driven Program, it shows everything from
the beginning to the end.
Although this is the thought of how the program should work for now. This structured chart is
subject to change if necessary alterations are required.
All the information required for a software engineer to understand how the program works is
shown with clear indications of the ordering.

8
Algorithms and proper explanation for the computations used
(By everyone)

Flowchart for Median by Fam Yao Deng

9
Flowchart for Mean by Fam Yao Deng

10
Maximum Flowchart by Mohammed Al Hindi

11
Minimum Flowchart by Mohammed Al Hindi

12
Standard Deviation Flowchart by Fatema Tuj Johra

13
Variance Flowchart by Fatema Tuj Johra

14
Pearson’s Correlation Flowchart by Quinito Norman Octaviano

15
Linear Regression Flowchart by Quinito Norman Octaviano

16

You might also like