Initialize PA09
++ PA09 Files ++ Makefile for PA09
This commit is contained in:
parent
ba683c4f44
commit
146e26b5cf
17 changed files with 3832 additions and 0 deletions
63
PA09-1108/StudentUtility.h
Normal file
63
PA09-1108/StudentUtility.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
// Precompiler directives /////////////////////////////////////////////////////
|
||||
|
||||
#ifndef STUDENT_UTILITY_H
|
||||
#define STUDENT_UTILITY_H
|
||||
|
||||
// Header files ///////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "StandardConstants.h"
|
||||
#include "GeneralUtility.h"
|
||||
|
||||
// global constants ////////////////////////////////////////////////////////////
|
||||
|
||||
// None
|
||||
|
||||
// data structures /////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct StudentStruct
|
||||
{
|
||||
char name[ MAX_STR_LEN ];
|
||||
int studentId;
|
||||
char gender;
|
||||
double gpa;
|
||||
int priority;
|
||||
|
||||
} StudentType;
|
||||
|
||||
typedef struct StudentArrayStruct
|
||||
{
|
||||
StudentType *array;
|
||||
|
||||
int size, capacity;
|
||||
} StudentArrayType;
|
||||
|
||||
/*
|
||||
Name: deepCopyStudentDAta
|
||||
Process: copies one StudentType item into another
|
||||
Function input/parameters: source data (const StudentType)
|
||||
Function output/parameters: destination data (StudentType *)
|
||||
Function output/returned: none
|
||||
Device input/ ---: none
|
||||
Device output/ ---: none
|
||||
Dependencies: privateCopyString
|
||||
*/
|
||||
void deepCopyStudentData( StudentType *dest, const StudentType source );
|
||||
|
||||
/*
|
||||
Name: studentDataToString
|
||||
Process: creates display string from all object data
|
||||
Method input/parameters: none
|
||||
Method output/parameters: pointer to return string (char * const)
|
||||
Method output/returned: none
|
||||
Device input/keyboard: none
|
||||
Device output/monitor: none
|
||||
Dependencies: sprintf
|
||||
*/
|
||||
void studentDataToString( char *outString, const StudentType toDisplay );
|
||||
|
||||
#endif // STUDENT_UTILITY_H
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue