R9490/homework2d50596731255master
README.md
HOMEWORK 2 |
____________ |
Students: Carlo Peruzzo Alexis Saez Uribe
EXERCISE 1 1)How to compile the code: -open a shell in the location of your local repository and execute the following commands:
mkdir build cd build ccmake ../
Then the GUI should launch. -Hit 'c' to configure. -Hit 'enter' to edit the variable CMAKE_BUILD_TYPE. -Write 'Debug'. -Hit 'enter' to confirm. -Hit 'c' to configure. -Hit 'g' to generate. -Type the following command: make
2)How to run: -Type the following command: ./src/homework2.exe
EXERCISE 2
- What is the best way/strategy to divide the work among yourselves?
We can take advantage of the concept of interfaces in C++ and define the mother class "Series" and the daughter classes "ComputeArithmetic" and "ComputePi", in a header file. In this way we define the members and methods of these classes, without implementing the methods but rather defining just the inputs/arguments and outputs expected by them. After, we can easily split the work and collaborate; being clear how to use the functions, we can either implement the functions in a .cpp file or use the functions in the main.cc file. Specifically for this exercise, one of us is going to implement the "compute" function of "ComputeArithmetic" class and its corresponding call from "main.cc", and the other one same tasks but for "ComputePi"