Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m tasked with teaching an accelerated university special topics course in Jav

ID: 653041 • Letter: I

Question

I'm tasked with teaching an accelerated university special topics course in Java for programmers with many years of experience in C/C++.

What sort of medium-length (1-2 hours max) assignments would you give, that would exercise the student's basic Java skills without seeming like an assignment one would give to someone learning Java as a first language? (The idea is to provoke thought about the difference between Java vs. C++ rather than insult the student with ridiculously simple programming in general.)

To clarify, the entire course is not 1-2 hours -- it will be 4 hours on the first day and 7 hours on the second and third day, for two weeks, for a total number of contact hours of 36 hours. This is comparable to a standard college course's number of hours, just dramatically compressed.

Explanation / Answer

I suggest you choose an assignment where one will need some dynamic sized arrays/vectors, since this will demonstrate one of the most important differences between C/C++ and Java: memory management. Things like

Sieve of Erastosthenes
Conway's "game of life"
The N queens puzzle
Another idea is to let them implement something like a linked list, which will show them the differences between the way pointers work in C/C++ on one hand, and object references in Java on the other hand.

However, you probably do not just want to focus only on the language differences, but also on the standard library differences. A text file parsing assignment, which forces one to use file stream and string operations and something like regular expressions would surely show a lot of differences between Java and C/C++.

If you have more time, and you are going to teach some GUI programming basics, you could also add some simple GUI programming task, like programming a small visualization for one of the suggested problems above. It should be obvious that they will learn here things from the Java world which are different from the C++ world.