IGU C++ Question
Description
Question 1:
- Exercise 71: Creating Different Types for the Position Objects
- Exercise 72: Comparing Position Values Using a Template Function
- Activity 11: Creating a Generic Stack
NB: Upload screenshots and your code files. The code should include
your name, date, and description at the beginning of the program in
the comments, please have fun with the code, feel free to change it up a bit
Example:
/* The code below will print the words Hello World!
to the screen, and it is amazing
Written By: Dr. Amakobe
Date: mm/dd/yyyy */
Question 2:
Links to an external site. is a feature. We write code once and use it for any data type including user defined data types.
Given three cases :
1st case when two strings are given , print the smallest of the two strings.
2nd case when two integers are given, print the smallest of the two integers.
3rd case when two char are given , print the smallest of the two characters(lowercase).
Your task is to complete class minElement which would include a
private variable say y, a constructor which would set the given value
to the private variable. And a method check() which would take one
parameter say x and print the min of x and y(private variable) .
First line of each input will contain 1 integer c. Next
line will contain two strings if c is equal to 1 or will contain two
integers if c is equal to 2 or will contain two char if value of c is
equal to 3. We have to print the lowest of the two values given.
Examples
Input: 1 gfg spl Output: gfg
Input: 2 5 9 Output: 5
Notes
-
- Don’t forget to
return
the result. - Include your name and date in the top comment section
- Upload screenshots of the output
- Upload your code
- Don’t forget to

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."