Month: February 2017

C++ for Financial Engineering

Instructions
ˆ This is an individual assignment.
ˆ Assignment Weight: 10% of the total nal assessment mark.
ˆ YOUR COMPLETED ASSIGNMENT MUST BE SUBMITTED NO LATER THAN
12:00 Monday 13th February 2017.
ˆ Submit an electronic copy on BlackBoard BEFORE 12:00 p.m. on the submission
date.
ˆ Submit code and Visual Studio solution and project les only. No need to write a
report.
ˆ Any late submissions will be dealt with according to school regulations.
Introduction
You are going to implement an interactive application that computes some Black-Scholes
formulas. You are expected to:
ˆ test and debug your program extensively.
ˆ write clear and well organized code.
The accompanying C++ source le contains some functions to compute:
ˆ Call pricing using Black-Scholes formula.
The functions are not currently used in the main() function which is currently not yet
implemented.

Games, Entities, and Events

Introduction:
In this lab you will put everything we have learned about C++ classes, handling events, and OO design
together to build a framework upon which a game could be written. As you work through each step be sure
to take notes, comment your code, and think about what is trying to be accomplished.
Code:
1. Rename the Player class to Entity.
a. Rename the header and source file
b. Update the include guard in the header
c. Rename the class and update all code until everything builds again
2. Add a Game::Load method.
a. Add a method prototype for the Load method in the Game class definition. The meth

Inventory Manager

Goal
You will be working with an existing inventory management program throughout the term. The base code that you
must start with is posted in
cuLearn. For this assignment, you will modify the base code to add a new entity class and
a new collection class. You will also implement a new feature and modify existing ones.
Learning Objectives
understand an existing object-oriented program
understand entity/control/UI classes, and their role in a program
add code to a small program in C++
Instructions:
1. Draw the UML class diagram:

Data Structures and Algorithms in C++

Presidents
This assignment will give you practice using simple control statements and text I/O
statements. Write a C++ program that will read a text file presidents.in that contains
information about former U.S. presidents and generate a report to the standard output,
which is the screen by default.
At the above CodeCheck URL, complete the program presidents.cpp in CodeCheck’s
edit box, and then press the “Submit” button. CodeCheck will compile and run your
program, and compare your output to a master report. You can type into CodeCheck’s
edit box directly, or you can first edit and test your program in the Eclipse or NetBeans
IDE, and then

Array

You will write a program which searches an array of integers to find a given integer. The program should print out the array index where the given integer is found, or it should print -1 to indicate that the integer was not found in the array. Array indices begin at 0. Your program will accept two arguments at the command line, 1) the name of the array filewhich contains the array, and 2) the integer to search for in the array. Give your executable the name MySearch. The following is an example of how your code will work when it is called with an array file called arr_file.txt which contains the following array, 5 6 7 8 9. In this example, we assume that the linux prompt is the symbol ‘$’.

 

$ MySearch arr_file.txt 6

1

 

$ MySearch arr_file.txt 8

3

 

$ MySearch arr_file.txt 2

-1

 

Multiple Processes

 

The unique aspect of this search is that it will use multiple processes to search different p