Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the answer very quickly In c++ code HW3-C - Function Overloading with Arrays (Chapter 6 + Chapter 7) Collapse context In this exercise,

I need the answer very quickly

In c++ code

HW3-C - Function Overloading with Arrays (Chapter 6 + Chapter 7)

Collapse context

In this exercise, the main code passes to the arrayMins function either an array of characters, or an array of floating-point numbers (of type double).

If the input array is a character array:

  • The arrayMins function will print the lowest small case letter and the lowest capital case letter (in this specific order) separated by a single space. In this case, the function returns with a TRUE.
  • If the array only contains small letters, it prints the lowest small case letter and returns with a FALSE.
  • If the array only contains capital letters , it prints the lowest capital case letter and returns with a FALSE.
  • If the array does not contain any small or capital letters, the function prints "NONE", and returns with a FALSE.

If the input array is a double array:

  • The arrayMins function will print the smallest and largest numbers in the array (in order) separated by a single space.
  • If the smallest and largest numbers are equal, the function will only print one of them.

You are required to write the body for the two overlaoded functions called arrayMins, one which handles the case for characters, and the other the case for doubles.

IMPORTANT NOTE

  • Do not write and submit the main subroutine, or any include statments, these are already written and hidden from you. However, if you want to test your solution in any IDE (e.g., CodeBlocks, CLion, Visual Studio, onlinegdb.com), then you will need to write your own main there for testing purposes.
  • In the function header, do not change the order of the formal paramaters or add/remove others parameters.
  • Do not change the function name.
  • Do not add any cout statements except for the final answer as specified above.
  • Do not add "Enter a number", "the number of digits is" or any similar prompts.

1

bool arrayMins (char inputArray[], int size)

2

{

3

 

4

 

5

 

6

 

7

 

8

}

9

 

10

void arrayMins (double inputArray[], int size)

11

{

12

 

13

 

14

 

15

 

16

 

17

}

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

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions