Question: Solve all in C++. 1 / Write a function to output an arbitrary double number (which might be negative) using only printDigit for I/O. 2/
Solve all in C++.
1 / Write a function to output an arbitrary double number (which might be negative) using only printDigit for I/O.
2/ write a recursive function that returns the number of 1 in binary representation of N . Use the fact that is equal to the number 1 in representation N/2 , plus 1 , if N is odd .
3/design a class template, collection, that stores a collection of objects (in an array), along with the current size of collection. Provide public function isEmpty,makeEmpty,insert , remove , and contains. contains(x) returns true if and only if an object that is equal to x is present in the collection.
4/define a rectangle class that provides getLength and getWidth. Using the findMax routines, write a main that creates an array of rectangle and finds the largest rectangle first on the basis of area and then on the basis of perimeter.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
