![#include <iostream> #include <cstring> 2 using namespace std 3 4 struct Student 5 6 char name[50], address[50]; int id double](http://img.homeworklib.com/questions/eab11ef0-7e99-11eb-aa47-eddbb194a047.png?x-oss-process=image/resize,w_560)
![25 int main) int x[] 1, 3, 4, 5}; Student s[3] s[e].id s[1].id s[2].id strcpy(s[0].name, Will Smith); strcpy(s[1].name, Jo](http://img.homeworklib.com/questions/eb3c9200-7e99-11eb-beda-5f4034280196.png?x-oss-process=image/resize,w_560)
// OUTPUT

#include <iostream>
#include <cstring>
using namespace std;
struct Student
{
char name[50], address[50];
int id;
double GPA;
};
void showData(Student a[], int size)
{
for(int i=0; i<size; i++)
cout << "Name:" << a[i].name << " | ID: " << a[i].id << " | GPA: " << a[i].GPA << " | Address: " << a[i].address << endl;
}
double avgGPA(Student a[], int size)
{
double total = 0;
for(int i=0; i<size; i++)
total += a[i].GPA;
return total / size*1.0;
}
int main() {
int x[] = {1, 3, 4, 5};
Student s[3];
s[0].id = 12;
s[1].id = 13;
s[2].id = 14;
strcpy(s[0].name, "Will Smith");
strcpy(s[1].name, "John Nash");
strcpy(s[2].name, "Carey Hart");
s[0].GPA = 6.0;
s[1].GPA = 9.7;
s[2].GPA = 5.9;
strcpy(s[0].address, "one");
strcpy(s[1].address, "two");
strcpy(s[2].address, "three");
showData(s, 3);
cout << "Average GPA = " << avgGPA(s, 3);
}
// Hit the thumbs up if you are fine with the answer. Happy Learning!
SC 111 - BMCC Exam Student Name: Type # 4 - 20 Points write a program...
In C++ write a program; Your goal is to create a structure to store information about a movie. Your program should have the following: -The name of the program should be Assignment8. -3 comment lines (description of the program, author, and date) -Write a program that uses a structure named MovieData to store the following information about a movie: (3 points) Title, Director, Year released, Running time (in minutes) The program should create 2 MovieData variables, store values in their...
2. Write a program named lab3 2.app that contains a class named Student to store student information Information that will be relevant to store is first name, last name, id number, GPA, and major (1) Define a member function named set0, which allows you to set all member variables. This function has an empty parameter list, and its return type is void. So, within the function you'll prompt for information. Note: For entering major, if you need a space, use...
C++Write a program that uses a class name MovieData to store the following information about a movie: create a class not a strcuture please. Title Director Year release Running time Inclue a constructor that allows all four of these memberdata values to be sprcified at the time a MovieData variable is created The program should create two MovieData variable. Do not use user input. Have a stand alone function that displays the information about the movie in a clearly formatted...
Write a Java program which will store, manipulate, and print student registration information. As part of the solution, identify the following classes: Student Admissions. The class Student must have the following fields – Name, Address, Id number, Courses, and Date, where: Name is a user defined class comprising of at minimum first name and last name. Address is a user defined class comprising of fields - street, city, state, and zip code. Date is a predefined class in the java.util...
Write the code to maintain a list of student records. The main flow of your program should be to read all information from file(s) and place it in arrays, loop and do stuff with the records (e.g., add, update, look up, etc.), before exiting optionally write the new information back to the file(s) before exiting. Please note the files are only accessed at the beginning and the end, do not change the files during the "do stuff loop" (unless you...
Add additional information to the student class below such as name, address, major, and contact information along with all the getters and setters (methods) needed to access all data. Submit your code along with a sample run of your program. Comment all your code. Cite any sources of information you use. Write a note on the process of completing the assignment in a Microsoft Word document. // ShowStudent.java // client to test the Student class class ShowStudent { public static...
Problem Specification:Write a C++ program to calculate student’s GPA for the semester in your class. For each student,the program should accept a student’s name, ID number and the number of courses he/she istaking, then for each course the following data is needed the course number a string e.g. BU 101 course credits “an integer” grade received for the course “a character”.The program should display each student’s information and their courses information. It shouldalso display the GPA for the semester. The...
C++ program
Write a C++ program to manage a hospital system, the system mainly uses file handling to perform basic operations like how to add, edit, search, and delete record. Write the following functions: 1. hospital_menu: This function will display the following menu and prompt the user to enter her/his option. The system will keep showing the menu repeatedly until the user selects option 'e' from the menu. Arkansas Children Hospital a. Add new patient record b. Search record c....
Add additional information to the student class below such as name, address, major, and contact information along with all the getters and setters (methods) needed to access all data. Submit your code along with a sample run of your program. Comment all your code. Cite any sources of information you use. Write a note on the process of completing the assignment in a Microsoft Word document. // ShowStudent.java // client to test the Student class class ShowStudent { public static...
Please write comments with the program. Python programming!! Part III - write student data In this part the program should create a .csv file and fill it with generated student information. The program should: Ask the user for a name for the .csv file (use your own name for the exercise) Create the .csv file with columns named - ID, first-name, GPA Based on the information received in part I, generate and fill students information in the CSV file Tell...