ecwu / comp1013_spgp Goto Github PK
View Code? Open in Web Editor NEWStructured Programming Repo for UICcst16 Y2A
Structured Programming Repo for UICcst16 Y2A
Because there are two different way to inquire the student's information, the first thing you should do is display a sub-menu (similar to the main() function's menu)
student.txt
file and load it into a sturct
arrayif user inputted a invalid number, output a warning message.
marks.txt
student.txt
or marks.txt
file and load it into a sturct
arraysturct
array according to student id and find the correct student marksstu
structure definition codestruct stu{
char name[10];
int studentID;
};
stuNMarks
(Student and Marks) structure definition codestruct stuNMarks{
char name[10];
int studentID;
float assignment1;
float assignment2;
float assignment3;
float assignment4;
float assignment5;
};
the default variable in the stuNMarks
structure:
Variable | Default Value |
---|---|
name | “”(\0 ) |
int | 0 |
assignment1 | NULL |
assignment2 | NULL |
assignment3 | NULL |
assignment4 | NULL |
assignment5 | NULL |
Main Menu is the main function of the system, It will display a menu for user to select specific function and call the sub-function that the user selected.
This is a new function
名字应该按行读取
如果名字中出现空格,一个名字会根据空格被分割成多个
修改读取方法
如果老师提供的Student 名单中,出现了带空格的名字,就会出现异常
stuNSum
structure definition codestruct stuNSum{
char name[10];
int studentID;
float sum;
};
marksNPointer
structure definition codestruct marksNPointer{
char name[10];
int studentID;
float sum;
struct marksNPointer *nextNode;
};
gradeFunction()
.the main() function can call the function
gradeFunction()
to execute the Grade action.
It is a function interface.
gradeFunction()
, any other function(s) you write can only execute inside the function gradeFunction()
.
5
meansAssignment 5
Assignment
and which Question
the user are grading.
e.g.
Grading for Assignment 2 - Question 4:
marks.txt
Format in file marks.txt
Name ID Assignment1 Assignment2 ......
Tony 1234 3.5 ...
Andrew 1235 3.3 ...
Amy 2323 4 ...
........
use
/t
to indent
for more information about the grading process, please refer to this link
4 digits number
and not begin with a 0
)students.txt
Sub Menu for Inquire (A.K.A. Search) function
This is a New Function
The guidelines for contributing has been written.
The content is incomplete
Continue writing the document
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.