Made by Tygo van den Hurk, a student of the Technical University of Eindhoven, The Netherlands.
With Student Number: 1705709
On 12th of december 2023, at 11:35 CET
for the assignment of 2IPC0 Programming methods,
G1a: Add Different Class Dividing Strategies to the Classdivider Project
Suggested workflow (from canvas on 12-dec-2023):
-
Extract the given starter project ZIP file: This creates directory
classdivider. -
Startup:
- Initialize a
Gitrepository in this directory withNetBeans. - Build and run the program.
- Run the existing tests. They should all pass.
- Generate the
JavaDocdocumentation. - Study the existing code to see how it differs from your solution to
Assignment W1 A3. - Run
Checkstyleon the project. There should be no errors. - If you're ready to start changing the project, increment the version property in the
pom.xmlto0.8. - Commit your work.
- Initialize a
-
Make the
publicandprotectedmethods in classClassDividerrobust and commit your work. -
Test robustness in
ClassDividerTestand commit your work. -
Apply the
Strategy Design Pattern:- Create a subclass of
ClassDividercalledRandomClassDivider. - Then make
ClassDividerabstract, and make methoddivideabstract. - In
RandomClassDivideroverride methoddivide. Cut and past the body ofClassDivider#dividetoRandomClassDivider#divide. - Implement
ClassDivisionStrategy#create. - Create a subclass of
ClassDividerTestcalledRandomClassDividerTest. Add a constructor in which you assign a new instance ofRandomClassDividerto protected instance variablecd. - Make
ClassDividerTestabstract. - Test the project: All tests should pass.
- Run
CheckStyleon your project: There should be no errors. - Commit your work.
- Create a subclass of
-
Add the
LastNamestrategy, including implementingNameRangePrinterand testingLastNameClassDivider. Commit your work. -
Add and test
BucketClassDivider. Commit your work. -
Add the two strategies
DutchAndInternationalsandGenders. Commit your work.
self added Steps:
- add your your name, student number, the date to all files.
- submit the result to canvas.
I followed the following steps exactly to complete the assignment as you suggested.