Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review beginners exercises Day 2 #545

Open
chavid opened this issue Feb 12, 2025 · 2 comments
Open

Review beginners exercises Day 2 #545

chavid opened this issue Feb 12, 2025 · 2 comments

Comments

@chavid
Copy link
Contributor

chavid commented Feb 12, 2025

@ALL If the ExerciceSchedule_EssentialCourse.md is up to date, Day 2, there is an exercise about virtual inheritance which seems to me completely irrelevant for beginners. On the contrary, something about object-functions (operator()) would help a lot for the template/stl exercises of Day 3. Either it deserves its own exercise, or it should be integrated in the operators exercise. For example, we may transform printAndCheck() into an object-function which store the maximum title length as a member variable (currently 40).

@chavid chavid changed the title Replace virtual inheritance with function-object. Review beginners exercises Day 2 Feb 12, 2025
@chavid
Copy link
Contributor Author

chavid commented Feb 12, 2025

Actually, it lacks at the beginning of Day 2 an exercise about the creation of a simple class. That may be Fracrion, without the operators...

@chavid
Copy link
Contributor Author

chavid commented Feb 12, 2025

@ALL, my proposal:

  • extract from current "operators" the creation of a class Fraction, all made with named methods and functions, a make it an introduction exercise about creating a class, with constructors, destructors, assignment.
  • as a second exercise, "operators", as I suggested in About operators exercise #439, plus the operator() as said above.
  • as a third exercise, "polymorphism".
  • keep "virtual inheritance" at last, if you care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant