Giter Club home page Giter Club logo

comp1013_spgp's People

Contributors

ecwu avatar zhanggzzy avatar

Watchers

 avatar  avatar  avatar  avatar

comp1013_spgp's Issues

New Function: Inquiry

  1. Don't Require a main function (but you can use your own main function to test your code.)
  2. Write one function call inquiryFunction() to search the score.
  3. You can write other function if you have any code will execute many times in grading process.
    a. Except the function inquiryFunction(), any other function(s) you write can only execute inside the function inquiryFunction().

Inquiry Process (Search)

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)

  1. Display a sub-menu and display three choice for the user
  • By Index
  • By Student ID
  • Quit
  1. Read the number which inputted by the user and call the "sub-sub-function"
    Then this Function been divided into two parts (two sub-function)

By Index

  1. First you should open the student.txt file and load it into a sturct array
  2. Add a index number in front of every line, and output the index "table"
  3. Ask user to input the index number, and read the number

if user inputted a invalid number, output a warning message.

  1. Find the corresponding data according to the index from marks.txt
  2. Print out the data

By Student ID

  1. First you should open the student.txt or marks.txt file and load it into a sturct array
  2. Ask user to input a student id number (4 digits), and read the number
  3. Traverse the whole sturct array according to student id and find the correct student marks
  4. Print out the data

Structure Standard

  1. the stu structure definition code
struct stu{
    char name[10];
    int studentID;
};
  1. the stuNMarks (Student and Marks) structure definition code
struct 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

New function: Main Menu

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.

Expected Behavior

  1. Prints out the Main Menu and ask user to input the sub-function index
  2. Call the sub-function that the user choice
  3. Every sub-funtion have to return a value to tell the main function whether the sub-function finished or not

Current Behavior

This is a new function

Bug: 名字中有空格时,名字不能被正常加载

Expected Behavior

名字应该按行读取

Current Behavior

如果名字中出现空格,一个名字会根据空格被分割成多个

Possible Solution

修改读取方法

Steps to Reproduce (for bugs)

  1. 进入 Grade 功能
  2. 输入需要 Grade 的 Assignment 和 Assignment 中的作业数量
  3. 为每个人输入时,名字显示不正常(被分割)

Context

如果老师提供的Student 名单中,出现了带空格的名字,就会出现异常

Your Environment

  • Version used: 0.4.2
  • Environment name and version (e.g. Chrome 39, node.js 5.4): NONE
  • Operating System and version (desktop or mobile): Windows 10

New Function: Sort

Structure Standard

  1. the stuNSum structure definition code
struct stuNSum{
    char name[10];
    int studentID;
    float sum;
};
  1. the marksNPointer structure definition code
struct marksNPointer{
    char name[10];
    int studentID;
    float sum;
    struct marksNPointer *nextNode;
};

New Function: Grade

  1. Don't Require a main function (but you can use your own main function to test your code.)
  2. Write one function call gradeFunction().

the main() function can call the function gradeFunction() to execute the Grade action.
It is a function interface.

  1. You can write other function if you have any code will execute many times in grading process.
    a. Except the function gradeFunction(), any other function(s) you write can only execute inside the function gradeFunction().

Grading Process

  1. Show a message tells that the user is using grade function.
  2. Ask the user to input the assignment index and question(s) amount. (you can separate this two input)

5 means Assignment 5

  1. The user can start to grade for students.
  • Show a message to tell the user which Assignment and which Question the user are grading.

    e.g.
    Grading for Assignment 2 - Question 4:

  • Read the grade letter the user inputted.
  1. Calculate the total score for the student.
  2. Start the next student.
  3. Once the grading process finished. All students' score save to a file call 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

Student List

  1. Student List including two information for one student.
  • Student Name
  • Student ID (Student's ID is a 4 digits number and not begin with a 0)
  1. You have to load the Student Name and ID into a two dimensional Array before grading.
  • or use a struct type
  1. The Student List File for the whole project is students.txt
  • There are no more than 20 students in total.

New Function: Sub Menu for Inquire Function

Sub Menu for Inquire (A.K.A. Search) function

Expected Behavior

  1. Display available function
  2. Read the choice input by user
  3. Call the correspond sub-function
  4. Each subfunction will return a status code to determine whether the function is finished or not.

Current Behavior

This is a New Function

Issue Sample for the Structured Programming Repo

Expected Behavior

The guidelines for contributing has been written.

Current Behavior

The content is incomplete

Possible Solution

Continue writing the document

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.