Problem

a. Create a Student class. Include appropriate fields and functions, including eight bit f...

a. Create a Student class. Include appropriate fields and functions, including eight bit fields that store characteristics of your choice, such as whether the student is a smoker or an early riser.


b. Write a program that creates 10 Student objects and a separate object that stores data about you. Then allow the program to select the most compatible roommates from the array of other Students. For example, if four of the roommate candidates each have five of the preferred characteristics, and no candidates have more, then select those four as possible roommates. Save the file as BestRoommates.cpp.


c. Write a program that creates 10 Student objects and a separate object that stores data about you. Prompt the user for data for the 11 objects, then allow the program to select the most compatible roommate for you from the array of other Students. Display all the roommate candidates, and then the most compatible one. If two or more candidates share the distinction of having the most compatible characteristics, then choose one of them randomly. Save the file as RandomRoommate.cpp. (Appendix E contains information on random numbers.)

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT