Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the week 3 assignment, create a class template for a class that holds an object and the number of data elements in the object.

For the week 3 assignment, create a class template for a class that holds an object and the number of data elements in the object. For example, if an Employee class has two data elements, an ID number and a salary, then the class template holds the number 2 and an Employee object; if a Student class contains 12 data elements, then the class template holds 12 and a Student. Code. Add a standard input function for the object that displays a message on the screen such as: You will be asked to enter X items, where X is the number of data elements. Write a main() function that tests your template class with 3 cases: a simple integer and two programmer designed classes. In each case, overload the operations for cout <<, and cin >>.

This is for C++

note: Do I need and header section for this program?

Example: Employee.cpp, Student.cpp, Assignment3.h.

And if so, what will go in the header section?

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

6. Explain what causes unsafe acts.

Answered: 1 week ago