Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is my header file: #ifndef ARRAY_H #define ARRAY_H #include #include /// An Array is a container that encapsulates a fixed size array. class Array

This is my header file:

#ifndef ARRAY_H #define ARRAY_H #include  #include  /// An Array is a container that encapsulates a fixed size array. class Array { public: // type aliases using value_type = int; using size_type = std::size_t; using reference = value_type&; using const_reference = const value_type&; // constants static const size_type CAPACITY = 20; // constructors Array(); Array(const value_type source[], size_type count); void fill(value_type value); reference at(size_type pos); const_reference at(size_type pos) const; reference front(); const_reference front() const; reference back(); const_reference back() const; private: value_type data[CAPACITY]; }; bool equal(const Array& lhs, const Array& rhs); void print(const Array& array, Array::size_type first = 0, Array::size_type last = Array::CAPACITY); 

Can you help me write a definition array.cpp, and Write the client program (unlab.cpp)

with the task is to implement a program that reads 20 integers from the standard input stream and stores them in an Array. Write separate functions to compute each of the following statistics.

The average of the integers in the Array The largest integer in the Array The smallest integer in the Array The number of even integers in the Array The number of odd integers in the Array

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions