A software developer is developing a student records module that stores students' college details. The data is represented internally in the student.c module as follows: struct Student { char name[50]; int id ; double gpa ; } ; /* Data declared global, but private to student.c */ int ns = 0 ; static struct Student *sarr = NULL ; 1. Design an API to form the interface to this module. 2. Provide an example of client code that uses the interface from question 1 above to access the private data in a controlled way.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
icon
Related questions
Question
A software developer is developing a student records module that stores students'
college details. The data is represented internally in the student.c module as follows:
struct Student
{
char name [50];
int id ;
double gpa ;
} ;
/* Data declared global, but private to student.c */
int ns = 0 ;
static struct Student *sarr = NULL ;
1. Design an API to form the interface to this module.
2. Provide an example of client code that uses the interface from question 1 above
to access the private data in a controlled way.
Transcribed Image Text:A software developer is developing a student records module that stores students' college details. The data is represented internally in the student.c module as follows: struct Student { char name [50]; int id ; double gpa ; } ; /* Data declared global, but private to student.c */ int ns = 0 ; static struct Student *sarr = NULL ; 1. Design an API to form the interface to this module. 2. Provide an example of client code that uses the interface from question 1 above to access the private data in a controlled way.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT