Professional Documents
Culture Documents
Dinthill Technical High School
Dinthill Technical High School
Dinthill Technical High School
Computer Science-IA
Centre number:-
Territory: Jamaica
Problem Definition……………………………………………………..2-3
Narrative………………………………………………………………..4
Algorithm……....………………………………………………………5
Code….…………………………………………………………………
Test Plan………………………………………………………………….
Print Screens……………………………………………………………..
Structure Chart……………………………………………………………..
Acknowledgment
First and foremost I would like to thank God for without him nothing is
teacher, Mr.Campbell who has devoted his time and energy in helping me
training centre for youths then later in the mid-fifties became a rural
and they provide a large technical- based academic programme. The staff
currently utilizes a manual system to register students for the new school
year. In this system, the staff utilizes alot of paper as they issue countless
rather tedious and time consuming as they have to manually fill in these
forms by hand each year. Calculating the student’s tuition for the new
school year is also difficult when the parents are unable to pay the full
registered with wrong information because the forms were filled out
information for the students, their class, and their tuition to be paid.Each
parent should have access to a form where they can fill out and are
the new school year and the tuition to be paid for that school year. The
parent should have the ability to input the name of the student,their age,
whether or not the student has been accepted for the next school year.The
program should also output the tuition fee for that school year and further
payment options available for parents who are unable to pay the full
the user should first select whether they are registering for the lower
of grades 12 and 13.After selecting the appropriate option for them the
user will be then required to fill out a form. Upon completion of this form
for that school year and will receive a special student ID number. The
student will then need to input this unique ID number in order to access
The user will then be required to choose from the three payment options
listed.The user has the option of paying the tuition in one full payment
Declare variables
Tuition- stores the required amount to be paid for the child’s school fee.
write ***********************************************
write ** --- **
***********************************************
write Please choose the option below that pertains to your child
write 1) Lower School(Grades 7-11)
read myinput
switch myinput
case 1:
login
break
case 2:
login2
break;
default:
menu
FILE *fptr;
student myStudents;
return;
");
Read myStudents.gender
Read myStudents.age
Read myStudents.grade
Read myStudents.phone_num
Read myStudents.email
registered!!!***
Endif
else
char ch;
fptr=fopen("emp.rec","r"
End else
if (fptr==NULL){
exit(EXIT_FAILURE);
do
ch=fgetc(fptr);
putchar(ch);
} while (ch!=EOF);
fclose(fptr);
system("cls");
paymentplan();
void login2(){
FILE *fptr;
student oldStudents;
fptr = fopen("emp.rec","w");
if (fptr==NULL){
return;
End if
Read oldStudents.fname,oldStudents.lname
Read oldStudents.gender
Read oldStudents.age
Read oldStudents.phone_num
Read oldStudents.email);
fclose(fptr);
if oldStudents.age>17 == oldStudents.age<20 /
registered!!!*** endif
else
System cls
End else
void paymentplan(){
student myStudents;
int tuition;
switch (myStudents.grade)
{
case 7:
case 8:
case 9:
case 10:
case 11:
tuition=28000;
break;
case 12:
case 13:
tuition=40000;
break;
float disc;
float newschfee;
int myplan;
Read myplan
if myplan=1 then
disc=tuition*-0.1
newschfee=tuition-disc
endif
else myplan=2
disc=tuition*-0.5
newschfee=tuition-disc
end else
else myplan=3
newschfee=tuition
end else
END.
Coding of Program
#include<stdio.h>
#include <stdlib.h>
#include <string.h>
// prototype
int grade;
int age;
int phone_num;
char fname[30];
char gender[30];
char lname[30];
char email[30];
} student;
// function prototypes
void welcomescreen();
void menu();
void login();
void login2();
void saverecord();
void paymentplan();
int main() {
welcomescreen();
menu();
paymentplan();
return 0;
void welcomescreen(){
printf("
\t***********************************************\n");
printf("
\t***********************************************\n");
void menu(){
printf("\n\n Welcome to our main menu\n\n");
int myinput;
scanf("%d",&myinput);
system("cls");
switch (myinput)
case 1:
login();
break;
case 2:
login2();
break;
default:
menu();
}
void login(){
FILE *fptr;
student myStudents;
fptr = fopen("emp.rec","w");
if (fptr==NULL){
return;
scanf("%s%s",myStudents.fname,myStudents.lname);
scanf("%s",myStudents.gender);
scanf("%d",&myStudents.age);
scanf("%s",&myStudents.grade);
fprintf(fptr, "GRADE =%d\n,myStudents.grade ");
scanf("%ld",&myStudents.phone_num);
scanf("%s",&myStudents.email);
fclose(fptr);
registered!!!***\n");
} else {
char ch;
fptr=fopen("emp.rec","r");
if (fptr==NULL){
exit(EXIT_FAILURE);
}
printf("file is open\n\n");
do
ch=fgetc(fptr);
putchar(ch);
} while (ch!=EOF);
fclose(fptr);
system("cls");
paymentplan();
void login2(){
FILE *fptr;
student oldStudents;
fptr = fopen("emp.rec","w");
if (fptr==NULL){
return;
scanf("%s%s",oldStudents.fname,oldStudents.lname);
scanf("%s",oldStudents.gender);
scanf("%d",&oldStudents.age);
scanf("%s",&oldStudents.grade);
scanf("%d",&oldStudents.phone_num);
scanf("%s",&oldStudents.email);
fclose(fptr);
registered!!!***\n");
} else {
}
void paymentplan(){
student myStudents;
int tuition;
switch (myStudents.grade)
case 7:
case 8:
case 9:
case 10:
case 11:
tuition=28000;
break;
case 12:
case 13:
tuition=40000;
break;
float disc;
float newschfee;
int myplan;
scanf("%d",&myplan);
if (myplan=1){
disc=tuition*-0.1;
newschfee=tuition-disc;
else if(myplan=2){
disc=tuition*-0.5;
newschfee=tuition-disc;
else (myplan=3); {
newschfee=tuition+2;
}
Testing and Presentation
Variable Test Test Data Purpose of User’s Actual
Name Type Data Expected Results
Result
fname,lname string Sam morgan To allow the The program The program
program to store the data stores the data
store the and asks for the and asks for the
name of the next input student’s next
user piece of
information
grade integer 12 To allow the The program The program
program to store the data utilizes this info
store the and asks for the to establish if
grade of the next input the user will be
user accepted
age integer 18 To allow the The program The program
program to stores the data uses this data to
store the age and asks for the determine the
of the user student’s next tuition
piece of
information
Variable Test Type Test Purpose of User’s Expected Actual Results