Presentation is loading. Please wait.

Presentation is loading. Please wait.

C++ / G4MICE Course Session 4 Create a complete C++ class

Similar presentations


Presentation on theme: "C++ / G4MICE Course Session 4 Create a complete C++ class"— Presentation transcript:

1 C++ / G4MICE Course Session 4 Create a complete C++ class
Introduction to Unit Testing Documentation and Doxygen Homework!!!

2 ThreeVector For this session (and the homework) we will develop a complete C++ class to represent a 3-vector. We will also document and test the class.

3 ThreeVector I have provided a file ThreeVector.hh which contains the signatures of the public methods that you need to implement. There is also a ThreeVector.cc file which currently has no implementation in it. It is up to you to implement the functions, including any necessary private variables.

4 Unit Testing For each method in the class, you should add some code in the UnitTest.cc program to test that method. You should consider the range of situations that the class will have to deal with and attempt to cover all of the plausible cases.

5 Documentation All of the code should be documented (the .hh, .cc and the unit test). If you want to, you can try to use the format that doxygen understands: The doxygen generated documentation for G4MICE can be found here:

6 To Work! Try to implement the functions that are currently listed in the ThreeVector.hh file. If you have time, you can try to add some more advanced functions, such as the assignment operator or look at over-loading some of the mathematical operators or a logical operator.


Download ppt "C++ / G4MICE Course Session 4 Create a complete C++ class"

Similar presentations


Ads by Google