Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

do in c++ please Computer Science II CSCI 136 - Lesson 4 Class Template and Function Overloading Purpose: The goal of this lab is to

image text in transcribed

do in c++ please

Computer Science II CSCI 136 - Lesson 4 Class Template and Function Overloading Purpose: The goal of this lab is to experience how to pass any data type into a class/function template by using a type of parameter (template). As discussed in class, a class template is a simple and yet very powerful tool in C++ that helps to use same operations and containers for different object types. You will explore the idea of passing data type as a parameter so that we do not need to write the same code for different data types. Tasks: This lab must be completed and submitted on or before the due date Sunday 11:59pm. Submission link is provided on Blackboard. Lab-Homework - Write a class program that can store data items of any data type (int, float, char, string, and double) in an array container within a class. That is one class, one private member array container (any other data member data) and member functions based on the data type. Your program must be able to pass the type of the elements into the array container using a function in the class from the main(), and print content. All operations (e.g., function to add elements and display/print) must be member functions in the class. You will create an object for each of the data types (e.g., intObject, floatObject, etc.); store/add at least 5 elements of each data types in the container using a member function and list the content (use the display/print function to list content). Rubric: Grading for this lab will be based on your ability to declare and define the class. Implement the container to store the different types of data. Have fun

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions

Question

Can you please solve this problem and show the excel commands too.

Answered: 1 week ago

Question

4-35. The two reporters (ran after) every lead enthusiastically.

Answered: 1 week ago