Question: 1 . Comparable class Define class Comparable in file Compareble.h . Since the methods are very small, make them all inlined. 1 . 1 .
Comparable class
Define class Comparable in file Compareble.h Since the methods are very small, make
them all inlined.
points Has two private data components of the same type, named item and item
points Has a public function bool firstIsLessThanSecond that checks if
item is less than item
points Has a public function bool firstIsGreaterThanSecond that checks if
item is greater than item
points Has public function bool firstIsEqualToSecond that checks if item is
equal to item
points Has a constructor Comparable that receives two inputs of the same
type as the private data components and assigns the first input to item and the
second input to item
main function
In main.cpp do the following step by step:
point Define integer array a and initialize it with numbers and
point Define character array str of length and initialize it with Hello
points Declare vec to be a vector of integers, and vec to be a vector of characters.
points Define function void reverseArray that receives an array of any
arbitrary type, along with its size an integer It reverses the order of array elements.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
