Many engineering applications require "normalizing" an n-clement vector V. Each element w, of the normalized vector W is defined as follows: Vị Wi = En-1 i%3D0 Write the C++ code with the following specifications to solve for the calculation of w • Based on the given formula w, write a class called Vector that contains an array as class members for vector V (n can be up to ten elements) and other necessary data member(s) o necessary member functions to get input from user, manipulate the data member(s) and output the result of w. Display the results to the screen as well as data file named 'normalize.txt'. o constructor to initialize some or all of the data member(s) Write a main function that tests your class and constructor. Following is the example of the output at screen and the data file.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Many engineering applications require "normalizing" an n-clement vector V. Each element wy of the
normalized vector W is defined as follows:
Vị
Wi
yn-1 vi?
Li=0
Write the C++ code with the following specifications to solve for the calculation of w
Based on the given formula w, write a class called Vector that contains
an array as class members for vector V (n can be up to ten elements) and other
necessary data member(s)
o necessary member functions to get input from user, manipulate the data member(s)
and output the result of w. Display the results to the screen as well as data file
named 'normalize.txt'.
o constructor to initialize some or all of the data member(s)
Write a main function that tests your class and constructor. Following is the example of the
output at screen and the data file.
Screen:
Data file:
froe constructor:
The normalized vector:
O] - 0.316228
A1 - 0.316228
2) - 0.316228
normalize - Notepad
File Edit Format View Help
The vectors are:
e.316228
- 0.316228
0.316228
0.316228
0.316228
6.
ME8]-0.316228
9)- 0.316228
How many elements do you want to enter?
w[@]
W[1]
w[2]
W[3]
The normalized vector:
0.581238
-0.348743
- 0.232495
Please enter vector
0.697486
The normallzed vectors
口
21
Transcribed Image Text:Many engineering applications require "normalizing" an n-clement vector V. Each element wy of the normalized vector W is defined as follows: Vị Wi yn-1 vi? Li=0 Write the C++ code with the following specifications to solve for the calculation of w Based on the given formula w, write a class called Vector that contains an array as class members for vector V (n can be up to ten elements) and other necessary data member(s) o necessary member functions to get input from user, manipulate the data member(s) and output the result of w. Display the results to the screen as well as data file named 'normalize.txt'. o constructor to initialize some or all of the data member(s) Write a main function that tests your class and constructor. Following is the example of the output at screen and the data file. Screen: Data file: froe constructor: The normalized vector: O] - 0.316228 A1 - 0.316228 2) - 0.316228 normalize - Notepad File Edit Format View Help The vectors are: e.316228 - 0.316228 0.316228 0.316228 0.316228 6. ME8]-0.316228 9)- 0.316228 How many elements do you want to enter? w[@] W[1] w[2] W[3] The normalized vector: 0.581238 -0.348743 - 0.232495 Please enter vector 0.697486 The normallzed vectors 口 21
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY