Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program which: 1. Prompts the user to enter 5 integers 2. Validates each user entry to ensure that it is an integer 3.

image text in transcribedimage text in transcribed

Write a program which: 1. Prompts the user to enter 5 integers 2. Validates each user entry to ensure that it is an integer 3. Stores the user entries in a one-dimensional array of type int 4. Displays the largest and smallest integer in the array (assume all integers in the array are unique and distinct) Requirements: The program must consist of a class called Integers. The class must have: 1. A public function/method called setUserEntry. This function/method is used to: 1. Prompt the user for an integer 2. Invoke a method called validate which verifies that the entry is in fact an integer, if the entry is not an integer, the user is NOT allowed to proceed until he/she enters an integer. 2. A public function/method called validate ; which verifies that the entry is in fact an integer, if the entry is not an integer, the user is NOT allowed to proceed until he/she enters an integer. 3. The constructor uses a loop to initialize the elements in the array to zero 4. The displayIntegers function/method is a "const" public function/function which takes no parameters and uses a loop to display the values of the array. 5. The getLargestSmallestintegers is a public function/method which displays the largest and the smallest integers in the array. 6. The array is of type int, size 5 and is a private member. 7. The main function must use a loop to keep the user in the program until he/she wants to quit. 8. You MUST submit The following THREE files: 1. A separate .h file called Integers.h.txt 2. A separate cpp file called Integerslmp.cpp.txt 3. A separate.cpp file with main) called main.cpp.txt 4. Don't forget the corresponding pdf files

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions

Question

Explain the process of MBO

Answered: 1 week ago