Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming in C++ 4. Part 2 Structs and Arrays (65 points). In this assignment, we will be making a program that reads in students' information

Programming in C++

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

4. Part 2 Structs and Arrays (65 points). In this assignment, we will be making a program that reads in students' information and create a classroom seating arrangement with a number of rows and columns specified by a user. Then it will attempt to assign each student to a seat in a classroom. Use the file main_part2.cpp (attached at the end of this document) Include all the following requested code in new .cpp and *h files, as needed. Step 1 First, you need to create a class Student. Create student.cpp and student h files. It should contain two variables, lastName (char [30]) and firstName (char [30]). Both should be private. In addition, the following functions should be defined. All of them are public Description of the Method Constructs a Student object by assigning the default string"??" to both instance variables, lastName and firstName. Student () Student (char* studentlnfo) Use the strtok function to extract first name and last name, then Constructs a Student object using the string containing student's info. assign them to each instance variable of the Student class. An example of the input string is: David/Johnson char* getFirstName ) |It should return the instance variable firstName. 4. Part 2 Structs and Arrays (65 points). In this assignment, we will be making a program that reads in students' information and create a classroom seating arrangement with a number of rows and columns specified by a user. Then it will attempt to assign each student to a seat in a classroom. Use the file main_part2.cpp (attached at the end of this document) Include all the following requested code in new .cpp and *h files, as needed. Step 1 First, you need to create a class Student. Create student.cpp and student h files. It should contain two variables, lastName (char [30]) and firstName (char [30]). Both should be private. In addition, the following functions should be defined. All of them are public Description of the Method Constructs a Student object by assigning the default string"??" to both instance variables, lastName and firstName. Student () Student (char* studentlnfo) Use the strtok function to extract first name and last name, then Constructs a Student object using the string containing student's info. assign them to each instance variable of the Student class. An example of the input string is: David/Johnson char* getFirstName ) |It should return the instance variable firstName

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

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

d. Who are important leaders and heroes of the group?

Answered: 1 week ago

Question

Explain the factors influencing consumer behaviour.

Answered: 1 week ago

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago