Sie sind auf Seite 1von 6

BEE1222: COMPUTER PROGRAMMING PROJECT BRIEF This project brief contains FIVE (5) project descriptions/questions.

Do ONLY ONE (1). Select the question based on the following table:
Question: Last digit of student ID# 1 1 6 2 2 7 3 3 8 4 4 9 5 5 0

SEMESTER: 0809/II

Submit a hard copy of your program specification/conceptualization, test plan, algorithm (flow-chart or pseudocode) and source code (program). Also email your source code to your lecturer email address (check with your lecturer for his/her correct email address). Use your student ID# as filename of your source code. E.g. if your student ID# is EG08000 then the filename of your source code shall be EG08000.c This project is due on 17-Apr-2009

QUESTION 1

Students t-test is one of the most useful tools used by practicing engineers to determine the significant of improvement/changes made to product, process, machine, equipment or system. It is usually used to compare the significance of performance differences between two processes, machines, equipments or systems producing a same product. The formula used in t-test is given as follow: 1. If the population standard deviation is known then | | 1 1

Where = the means of the first sample, = the mean of the second sample, = standard deviation of the population, = the number in the first sample and = the number in the second sample. 2. If the population standard deviation is unknown then
2

Where = standard deviation of the first sample and = standard deviation of second sample. The objective of this project is to develop a program that calculates the value of u or t based on the condition stated above. In doing so, the following shall be developed: a. b. c. d. A Function that reads value for sample and calculates the sample means (average). Function shall return and n. (Hint: use pointers) A Function that calculates the sample standard deviation. A Function that calculates and display u or t based on condition stated. A Function main () that prompt for user inputs and calls all appropriate functions according to the algorithm developed.

| |

1 1

Use the following data to test your program: Set 1: (Population standard deviation = 11.8) x1 x2 55 73 55 65 60 60 62 47 50 75 75 52 60 60 53 55 57 55 65 72

45

65

65

Set 2: (Population standard deviation unknown) x1 x2 49 67 52 43 46 79 59 52 41 58 33 54 32 54 41 71 49 29 54 64 36 50 26

QUESTION 2

In order to provide a balance group learning environment, a group of 30 students is to be divided into 6 groups of relatively identical in term of their previous semesters CGPA. Each group shall consist of 5 students whose CGPA are almost identical. The objective of this project is to develop a program that will divide the students into six (6) groups of five (5) members. To successfully achieve this project objective, the following items should be developed: a. A user-defined function that prompts user to input 30 student data; i.e. student ID number and student CGPA. b. A user-defined function that sorts student data in ascending order based on the CGPA value. If two or more students have identical CGPA, the students with the same CGPA are ranked according to their student ID number in ascending order. c. A user-defined function that prints/displays a list of students grouped into six groups of five members. The grouping is based on the student CGPA ranking; i.e. the first group consists of students ranked 1 to 5, the second group consists of students ranked 6 to 10, so on. d. A function main () that calls all appropriate functions according to the algorithm developed. Use the following data set to test your program: EE10006 EE10008 EE10019 EE10023 EE10026 EE10042 EE10047 EE10048 EE10050 EE10051 EE10053 EE10054 EE10059 EE10060 EE10061 EE10062 EE10067 EE10071 EE10072 EE10073 EE10074 EE10075 EE10076 EE10077 EE10079 EE10088 EE10093 EE10097 EE10098 EE10100 2.85 2.92 2.87 2.54 2.65 2.71 2.50 2.42 2.40 2.63 2.66 2.46 2.65 2.72 2.67 2.37 2.72 2.41 2.51 2.56 2.44 2.45 2.66 2.36 2.63 2.61 2.51 2.67 2.57 2.46

QUESTION 3

Correlation analysis usually is used by practicing engineers to determine the relationship between two variables. Since correlation of two variables is not always perfect, a quantity called coefficient of correlation (r) is calculated to determine the degree of correlation between the two variables. The value of r is calculated using formula:

, where n = number of point of (x, y) coordinate,

and

The objective of this project is to develop a program that calculates the value of coefficient of correlation (r) based on the formula stated above. In doing so, the following shall be developed: a. b. c. d. A Function that reads value for coordinate and . A Function that calculates and return the values and, the standard deviation values. (Hint: use pointer variables) A Function that calculates and display the coefficient of correlation (r). A Function main () that prompt for user inputs and calls all appropriate functions according to the algorithm developed.

Use the following data to test your program: xi yi 160 65.8 180.3 71.7 182.9 70.8 172.7 67.2 190.5 74.0 167.6 70.4 172.7 69.5 193.0 71.7 180.3 68.1 177.8 69.9

xi yi

60 165.8

80.3 171.7

82.9 170.8

72.7 167.2

90.5 174.0

67.6 170.4

72.7 169.5

93.0 171.7

80.3 168.1

77.8 169.9

xi yi

60 65.8

80.3 71.7

82.9 70.8

72.7 67.2

90.5 74.0

67.6 70.4

72.7 69.5

93.0 71.7

80.3 68.1

77.8 69.9

QUESTION 4

Our NRIC number is embedded with several coded information to indicate amongst other the birth state and the gender of the bearer named on the NRIC document. For example:

NRIC number: 750228015081


These two digits indicate birth state Last digit indicates gender; Odd for male, Even for female

The objective of this project is to develop a program that counts the number of individuals according to gender and birth state (i.e. number of male/female individuals from each state). To successfully achieve this project objective, the following items should be developed: a. A user-defined function to prompt user to enter NRIC number according to format indicated above and store the information in a text file named info.txt. b. A user-defined function to read the data from the text-file (info.txt) and display the number of individuals according to gender and birth state. c. d. A user-defined function to count the number of individuals according to gender and birth state. A function main () to display selection menu to call the user-defined function developed in (a.) and (b.) above.

Use the following data to test your program: 721102045179 710317065200 850626085174 861212045252 770229055177 810101015151 830111065246 760831045117 860214085100 790911015214 751102045178 810317065203 750626085274 861212045253 870229055167 880101015111 730114065164 860831045179 760214085176 890227015141

QUESTION 5

Doing business over the internet has necessitated the use of e-catalog. By having e-catalog potential customer can search stock item, inquire price and stock availability etc. Indeed, a lot can done to simplify customers buying experience. The objective of this project is to develop a program to maintain a price directory of food items where a user can enquire the price of a food item as well as the food items for a certain price range. To successfully achieve the objective of this project, the following items shall be developed: a. A user-defined function that allow an administrative personnel to enter the price of new food item and update the price of food item. The data shall be password protected and shall be stored in a text file named foodprice.txt. A user-defined function that prompt public user to enter the description of a food item. The function shall search and display the price of food item being inquired. A user-defined function that prompt public user to enter price range for item search. The function shall search and display all food items within price range. A function main () that display a selection menu to call the user-defined function developed above.

b. c. d.

Use the following data to test your program: Instant milk powder Condensed milk Evaporated milk Instant coffee Ground coffee Tea leaf Tea sachet Mineral water Drinking water Full cream milk powder RM21.50 RM9.85 RM6.99 RM17.89 RM11.50 RM4.75 RM9.90 RM1.20 RM0.80 RM24.99

Das könnte Ihnen auch gefallen