Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

cements ments ions coring Write a C++ console program that prompts a user to enter attributes for three students, and outputs the collected data in

image text in transcribed
image text in transcribed
image text in transcribed
cements ments ions coring Write a C++ console program that prompts a user to enter attributes for three students, and outputs the collected data in a nicely-formatted table. Name the CPP as you wish. This is very similar to the program sample earlier in this module with Jack and Jill and their classmate, except that all three are to be entered using cin, not just the one classmate. Since the code block to prompt the user for attributes and cin and store their values is to be used three times instead of just one, write a generic value-returning function to do all that and return a Student object. Call it three times from main -- once for each student. You may write a void function to output the result for a Student object, shared as a parameter. Here are other requirements: 1. Customize the attributes. Include exactly five of your choosing 2. Include table column headings, correctly-spaced. 3. The total of all column widths and the spaces separating them should not exceed 80 spaces. 4. You choose which attributes to left-justify, right-justify, or center (centering is not easy -- use Q&A to exchange ideas!). 5. Use cin >> for at least one attribute, and get line for at least one. 6. Use the string buffer method to cin numbers (as per usual). 7. Serialize down to students.but as the last thing that your program does. If you do this right, the file should have 15 lines -- 5 for each of the 3 objects. You don't need to write the table column heading in the file as when you would write to cout. We will not fully implement serialization in this assignment. But to prepare for it in later assignments, you'll include "Serializing down" in this one. It will have no effect on the program, because you won't be serializing up. But it's done this way here to get you used to making sure that serializing down works right before attempting add serializing up in all future work. More Input Redirection dent ary More Input Redirection Just like you did in the previous lab, type all your Input Into a TXT file (for example, Input.txt). With so many lines of input in this program, redirection will save you lots of time in development! Something like this: John Doe 21 Concord Jane Doe 24 Lafayette Like that, but with all three students and all 5 attributes. If you do this right, it will be 15 lines long. Store the file in the same folder as your CPP. Then when you run, do this on a Windows PC: a.exe

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

Step: 3

blur-text-image

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

Describe the client/server model for application processing.

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago