Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This uses C please help me I have 2 hours to submit Write code for the struct header file named course.h that consists of the

image text in transcribedThis uses C please help me I have 2 hours to submit

Write code for the struct header file named "course.h" that consists of the following: header guard struct definition for Course which consists of: subject (string of 2 characters) - refers to the subject/department for the course, e.g., "CS" courseNo (int) - refers to the course number, e.g., 1083, 1714 o maxEnrollment (int) - refers to the maximum number of students that can be enrolled in the course curEnrollment (int) - refers to the number of students that are currently enrolled in the course function prototypes for the following functions: fillCourses() The function will take in two parameters: array by reference and the length of the array. The function will not return anything, The function will initialize all the data members for all the struct array objects. subject values should be initialized to "CS" courseNo values should be initialized to the index in the array maxEnrollment values should be initialized to a random value between 50 and 80, inclusive o curEnrollment values should be initialized to 0 calculate AverageEnrollment() The function will take in two parameters: array by reference and the length of the array. . It will calculate the average enrollment for all courses using the curEnrollment data member. The function will return this average (double) value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago

Question

=+6. What does the invisible hand of the marketplace do?

Answered: 1 week ago