Hello C++ / OOPP Homework Solution

Reading Homework
 Read Chapters 1, 2, and 3 of Exploring C++
 Re-read the .pdf lecture notes from the rst class.
 Re-read the course syllabus, including instructions on how to submit homework.
Written Homework The purpose of this assignment is for me to nd out what you know and what you need to be taught. It is extremely important for you to do this work without trying to impress me. Please use the rst three chapters of the textbook and class lecture notes as your only references.
 Please use a word processor.
 Read the .hpp and .cpp les of the InsertionSort example program. Turn in a list of 15 to 20 lines in the program that use techniques that are new to you or those that you understand only partially. For each line of code, say a few words about what you do not understand.
 If you don't understand anything, get back to me by September 3.
 If you absolutely do understand every nuance, submit a list of about 15 lines of code that use the most advanced techniques and style and brie y say why they are \advanced".
The IDE. Before Labor Day, download, install, and try one of these IDE / compiler combinations:
 XCode developer tools. The default installation uses the CLang C++ compiler.
 Eclipse on Linux. The default download is called the CDT (C development toolkit) and is packaged with the Gnu C++ compiler (g++). This is ne. Alternatively, you can download CLang and install it under Eclipse. In some ways it is a better compiler.
 Eclipse on Windows. You need to install cygwin rst, then Eclipse, then g++. The mingw compiler is not adequate. Period.
Program 1. Write a short program; you do not need to de ne a class for it. Ask me if you need clari cation or help.
 Open a le named \randints.txt", which is linked to the website.
 This le contains a large number of integers, one per line. These numbers are all in the range 0 to 99. Read the numbers and store them in an array or in a vector.
 Print out the mean, median, and mode of the set of integers.
 The mean is the average of the numbers, a double value.
 The median is the value in the middle of the list after the numbers are sorted.
 The mode is the value that occurs most frequently in the list. You will need a second array to tally the number of times each value appears.
Powered by