Write a menu-driven program that will allow the user to run any of the following questions. Please put the functions headers in .h file and the functions definitions in a SRR file. 1. Write C++ code for a loop that simultaneously computes both the maximum and minimum element in a given vector. 2. Write a function double scalar_product(vector a, vector b) that computes the scalar product of two vectors. The scalar product of two vectors A(al, a2, a3) and B(b1, b2, b3} is another vector C given by C{c1, c2, c3) where cl = al b1, c2a2b2, c3 = a3 + b3. 3. Write a function that computes the alternating sum of all elements in a vector. For example, if alternatingSum() is called with a vector containing 149 16 9 7 4 9 11 then it computes 1-4+9-16+9-7+4-9+11=-2 4. Write a procedure reverse that reverses the sequence of elements in a vector. For example, if reverse is called with a vector containing 149 16 9 7 4 9 11 then the vector is changed 11 9 4 7 9 16 9 4 1 5. Write a function vector append(vector a, vector b) That appends one vector after another. For example, if a is 149 16 and bis then append returns the vector 9749 11 149 16 9 7 4 9 11 6. Write a function vector merge(vector a, vector b) that merges two arrays, alternating elements from both arrays. If one array is shorter than the other, then alternate as long as you can and then append the remaining elements from the longer array. For example, if vector a is
Write a menu-driven program that will allow the user to run any of the following questions. Please put the functions headers in .h file and the functions definitions in a SRR file. 1. Write C++ code for a loop that simultaneously computes both the maximum and minimum element in a given vector. 2. Write a function double scalar_product(vector a, vector b) that computes the scalar product of two vectors. The scalar product of two vectors A(al, a2, a3) and B(b1, b2, b3} is another vector C given by C{c1, c2, c3) where cl = al b1, c2a2b2, c3 = a3 + b3. 3. Write a function that computes the alternating sum of all elements in a vector. For example, if alternatingSum() is called with a vector containing 149 16 9 7 4 9 11 then it computes 1-4+9-16+9-7+4-9+11=-2 4. Write a procedure reverse that reverses the sequence of elements in a vector. For example, if reverse is called with a vector containing 149 16 9 7 4 9 11 then the vector is changed 11 9 4 7 9 16 9 4 1 5. Write a function vector append(vector a, vector b) That appends one vector after another. For example, if a is 149 16 and bis then append returns the vector 9749 11 149 16 9 7 4 9 11 6. Write a function vector merge(vector a, vector b) that merges two arrays, alternating elements from both arrays. If one array is shorter than the other, then alternate as long as you can and then append the remaining elements from the longer array. For example, if vector a is
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
These to two screenshots are ONE SINGLE assignment. If you cannot complete this assignment in full, do not answer this question.
If, however, you do plan on building a program using C++ based on the instructions from these two screenshots, then please continue. Thank you for your understanding.
When you are done, join all your programs together and present the user with a menu so they can select which one they want to run.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 12 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education