Assignment_11

Assignment_11 - Assignment_11_2.cpp (2 points) Reproduce...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science G175 - C++ Programming Assignment 11 Assignment_11_1.cpp (2 points) Write a program that reads integers until 0 is entered. Once input terminates, the program should report the total number of even integers entered ( excluding the 0), list the even values, their average (using a float value), the total number of odd integers entered, list the odd values and their average (using a float value). Hints: create an array of integers where you store the even values entered, and another array where you store the odd values. Also, make sure that your program does not crash when no even value has been entered (or no odd value)… This exercise does not require classes.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Assignment_11_2.cpp (2 points) Reproduce the Vector Class (shown in lecture) using three dimensions. That is, int x, y, z; are the three coordinates. Modify all the overloaded operators to conform to the new dimension. The operators to be overloaded are +, - (binary), - (unary), Vector * double, double * Vector, << (for cout). Create a short program that demonstrates the use of each of these functions. In addition to these labs, also review the Word document Session 11 that has been posted to the website. Please refer to our textbook, parts of chapter Lesson 13 for additional information. Page 1 of 1...
View Full Document

Ask a homework question - tutors are online