Thread: I need help
View Single Post
  #1 (permalink)  
Old 01-25-2008, 09:42 AM
Clemenza1983's Avatar
Clemenza1983 Clemenza1983 is offline
Member
 
Join Date: Jan 2008
Location: Singapore
Posts: 24
Clemenza1983 is on a distinguished road
Send a message via MSN to Clemenza1983
I need help
Hi All,

I am new to Java programming have not even started yet i am already stuck at doing pseudo-code. I have this assignment coming up require me to write a pseudo-code:

Can anyone please give my code a check coz i really clueless now.
--------------------------------------------------------------------------
Given a student file, you need to complete the following logical design task by using pseudo code:

1)Display the details of the students who are from Indonesia and study Multimedia

2)Show the total number of students of above student

3)Show the total number of female students in the file

4)show the average age of all the students
--------------------------------------------------------------------------
1. Initialize Total_Std_Count = 0
2. Initialize Total_Female_Std = 0
3. Initialize STD_NO = 0

4. OPEN STUDENT_FILE

5. READ a Record (NATIONALITY, SUBJECT, AGE, GENDER)

6. LOOP UNTIL end of file

7. IF every "NATIONALITY" matches "Indonesia" AND
8. IF every "SUBJECT" matches "Multimedia" THEN
Add 1 to Total_Std_Count
DISPLAY TOTAL_STD_COUNT
9. ELSE
DISPLAY "NO_STD_RECORD_FOUND"

10. ENDIF

11. IF every Gender = Female THEN
Add 1 to Total_Female_Std
DISPLAY Total_Female_Std
ELSE
DISPLAY "NO RECORD FOUND"

I got stuck at the calculate avg age. I do not know whether the above code is correct. Please do enlighten me thanks all.
Reply With Quote
Sponsored Links