Tasks You will implement a menu-driven C++ application that will model the following tasks to be accomplished by each geologist.  Create A. - Upon the user selecting this option, your C++ application...

1 answer below »
I am requesting quotes to write the attached c++ program


Tasks You will implement a menu-driven C++ application that will model the following tasks to be accomplished by each geologist.  Create A. - Upon the user selecting this option, your C++ application will create an integer pointer variable called A within your application’s main function. This pointer variable will be used to store the values representing a geologist’s observation for each site for each day. Your solution is required to call a function which accepts two integer values as its arguments, m and n, and returns a pointer to the newly created m by n integer array. You are to ensure that values for the minimum days and sites are validated before creating the m by n integer array. Note, the returned result of your function is expected to be assigned to A in your main function.  Populate A. - Upon the user selecting this option, your main function will call another function to assist it in randomly assigning integer values to each location in A. You are to ensure that only valid values are generated and stored – as used by a geologist for recording their observations.  Scale A. - Upon the user selecting this option, your main function will call another function to assist it in performing a scalar multiplication – this is to be done by multiplying all integer values in A with a user’s inputted integer value. Only values between 2 and 10 (inclusively) are to be accepted and used to perform this scalar multiplication.  Compute percentage. - Upon the user selecting this option, your main function will display the highest and lowest values in A, and then create an n by 1 integer array called percentage. Your solution will then prompt the user to enter a value within the range of the highest and lowest displayed values. Next, for each site in A, your main function will compute and store the percentage of values that are greater than the user’s accepted value. Your solution will store the respective percentages obtained for each site in the array called percentage.  Exit program. - Upon the user selecting this option, your main function will prompt the user to confirm their choice to exit your application. Only if the user confirms the choice to exit should your application close; otherwise, it repeats the menu options for your user.
Answered Same DayOct 27, 2021

Answer To: Tasks You will implement a menu-driven C++ application that will model the following tasks to be...

Vibhav answered on Oct 27 2021
134 Votes
geology_cpp/1.JPG
geology_cpp/2.JPG
geology_cpp/geology.cpp
geology_cpp/geology.cpp
#include
#include
#include
using namespace std;
void printMenu(){
    cout<<"1. Create"<    cout<<"2. Populate"<    cout<<"3. Scale"<    cout<<"4. Compute percentage"<    cout<<"5. Exit"<}
int** create(int m, int n){
    int** table;
    table = new int*[m];
    for(int i=0; i        table[i] = new int[n];
    return table;
}
void populate(int **a, int m, int n){
    srand(time(0));
    for(int i=0; i        for(int j=0; j            a[i][j] = rand()%10 + 1;
    }
}
void print(int** a, int m, int n){
    for(int i=0; i        for(int j=0; j            cout<        }
        cout<    }
}
void scale(int** a, int m, int n, int num){
    for(int i=0; i        for(int j=0; j            a[i][j] *= num;
    }
}
int main(){
    int option = 0;
    int **A;
    int days = -1, sites = -1;
    do{
        printMenu();
        cout<<"Enter choice: ";
        cin>>option;
        switch(option){
            case 1:{
                do{
                    co...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here