To learn classes and objects at my university, students are required to develop
ID: 654351 • Letter: T
Question
To learn classes and objects at my university, students are required to develop a simple game (nine-mens morris or something similar) using Java. Java is used because of its libraries and tool support. What is the counterpart for C++.
Background: I am a researcher at a university working with drones. The programming language for the research group is naturally C++. However, like most universities the introductory language of choice where I work is Java. The problem is when the students join the research group, it is hard work to "unlearn" Java for C++. IMHO, it hurts more than it helps.
I want to propose teaching C++ instead; but I need to offer an alternative for learning classes and objects.
Explanation / Answer
For educational purposes, the best alternative to your Java-games-tasks when using C++ is to omit any GUI related tasks, so you can focus on problem solving and general programming concepts, without the need to introduce any big C++ framework. Stick to the command line, then you can use an arbitrary compiler (like GCC or MSVC++ Express) without any additional libraries.
I am pretty sure "nine-mens morris" can be programmed using command line only (though, of course, a graphical version may look much nicer). However, a good program for that kind of game is a non-trivial task, even without any GUI. Make sure to start with simpler tasks first if this is a beginners course.
If you really need GUI programming for educational purposes, you need to pick a C++ GUI framework. If that's the case, I suggest to go with Qt. Free, cross-platform and IMHO one of the best C++ GUI frameworks currently available. The only drawback is that Qt is huge (like the Java standard libs). And that may introduce problems you most probably don't want to be solved in your introductory courses.
There are other alternatives available, but all serious ones are not easier to handle than Qt (for example, in the MS Windows world native C++ GUI programming can still be done by using MFC, but honestly, you don't want to use that for a beginners course).
Finally, if you need some arguments for teaching something different than Java, read this post Joel Spolsky.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.