Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 - 1D Math Write a function to drive part 1. Write several other functions to complete each task. A - Fill the Array)

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Part 1 - 1D Math Write a function to drive part 1. Write several other functions to complete each task. A - Fill the Array) Ask the user for a size and dynamically allocate an integer array based on that size. Ask the user for a minimum integer and a maximum integer Fill the array with random integers between the minimum value and maximum value entered Sort it! (see extra credit opportunity below) Display the contents of the array. Calculate and output: .The average of the array . The median of the array . The number of unique (non-repeated) numbers in the array . The number of numbers that were duplicated o Note: how many are duplicated, not how many duplicates are there Part 2 - Single Dimension Character Array Write a void function to drive Part 2 A - Filling the array) Ask the user for a size and dynamically allocate the array based on that size. Initialize the array to contain all '10' characters. Write a function to fil1 the array with random lower-case letters. Prototype example: void fillArray(char* letters, int size); B Menu) Give the user a menu of options to process the array: 1. Check frequency of a letter 2. Remove a letter 3. Sort 4. Return to main menu Part 3- 2D Processing Part 2 wi11 have you doing the single dimensional operations to a 2D array of strings. Write a void function to drive Part 2 Part 2 starts by asking the user how many strings they want to create and the max 1ength of the strings. Each of these string wi11 be put in a row of their own in a 2D character array. Remember to end each row with a '0 After you have received the inputs - output the strings to confirm they were inputted correctly Give the user a menu of options to process the array: 1. Check frequency of a letter 2. Remove a letter 3. Return to Main Menu Apply the operation the user selects to ALL of the strings in the 2D array. Each time an operation finishes output the results for each row. NOTE if you coded part 2 correctly, this section can and wi11 make use of the exact same functions you coded earlier! From Main Menu User chooses 3: Choose an option: 3 How many strings do you want to enter? 11 What is the max size of the strings? 10 Enter string 1: testing Enter string 2: apple Enter string 3: document Enter string 4: computer Enter string 5: science Enter string 6: banana Enter string 7: orange Enter string 8: sugar Enter string 9: classes Enter string 10: fancy Enter string 11: flakes What would you like to do? Check frequency of a letter Remove a letter Return to Main Menu User chooses 1: What letter? a testing-0 apple1 document - 0 computer0 science-0 banana- 3 orange-1 sugar-1 classes-1 ancy -1 flakes1 User chooses 2: >>? 2 What letter? a testing pple document computer science bnn ornge sugr clsses Ency flkes Part 1 - 1D Math Write a function to drive part 1. Write several other functions to complete each task. A - Fill the Array) Ask the user for a size and dynamically allocate an integer array based on that size. Ask the user for a minimum integer and a maximum integer Fill the array with random integers between the minimum value and maximum value entered Sort it! (see extra credit opportunity below) Display the contents of the array. Calculate and output: .The average of the array . The median of the array . The number of unique (non-repeated) numbers in the array . The number of numbers that were duplicated o Note: how many are duplicated, not how many duplicates are there Part 2 - Single Dimension Character Array Write a void function to drive Part 2 A - Filling the array) Ask the user for a size and dynamically allocate the array based on that size. Initialize the array to contain all '10' characters. Write a function to fil1 the array with random lower-case letters. Prototype example: void fillArray(char* letters, int size); B Menu) Give the user a menu of options to process the array: 1. Check frequency of a letter 2. Remove a letter 3. Sort 4. Return to main menu Part 3- 2D Processing Part 2 wi11 have you doing the single dimensional operations to a 2D array of strings. Write a void function to drive Part 2 Part 2 starts by asking the user how many strings they want to create and the max 1ength of the strings. Each of these string wi11 be put in a row of their own in a 2D character array. Remember to end each row with a '0 After you have received the inputs - output the strings to confirm they were inputted correctly Give the user a menu of options to process the array: 1. Check frequency of a letter 2. Remove a letter 3. Return to Main Menu Apply the operation the user selects to ALL of the strings in the 2D array. Each time an operation finishes output the results for each row. NOTE if you coded part 2 correctly, this section can and wi11 make use of the exact same functions you coded earlier! From Main Menu User chooses 3: Choose an option: 3 How many strings do you want to enter? 11 What is the max size of the strings? 10 Enter string 1: testing Enter string 2: apple Enter string 3: document Enter string 4: computer Enter string 5: science Enter string 6: banana Enter string 7: orange Enter string 8: sugar Enter string 9: classes Enter string 10: fancy Enter string 11: flakes What would you like to do? Check frequency of a letter Remove a letter Return to Main Menu User chooses 1: What letter? a testing-0 apple1 document - 0 computer0 science-0 banana- 3 orange-1 sugar-1 classes-1 ancy -1 flakes1 User chooses 2: >>? 2 What letter? a testing pple document computer science bnn ornge sugr clsses Ency flkes

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

Does cognition guide behaviour?

Answered: 1 week ago

Question

Approaches to Managing Organizations

Answered: 1 week ago

Question

Communicating Organizational Culture

Answered: 1 week ago