Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interesting Console Program for C++ beginners

Tags:

c++

console

I’m teaching an entry-level C++ programming class. We only use iostream in the class (No GUI). It seems like students are not so excited to printout strings and numbers to their console. (Most students even never used the console before.) It is hard to motivate or convey the excitement of programming by showing strings in their console.

What would be a good and exciting console program that can be written by C++ beginners? I’m looking for something doable with basic C++ skill + a bit challenging + very exciting, which can motivate students to learn programming languages.

Any comments will be appreciated.

like image 350
Sung Kim Avatar asked Dec 21 '22 23:12

Sung Kim


2 Answers

When I taught an undergrad intro course, we did the Game of Fifteen in straight C as the third homework project. It's pretty well scoped, and it's a game, so there's some inherent motivation there.

like image 94
Ben Zotto Avatar answered Jan 08 '23 03:01

Ben Zotto


Back when I taught, I made an early project be an ATM machine.

Text-only interface, with basic operations like withdraw, deposit, query balance, transfer between accounts, etc.

It was something that everyone was already familiar with, it didn't take huge amounts of programming time, but it did help students feel like it was a practical and realistic program.

Other similar ideas would be a cash-register (handle refunds, coupons, items priced by the pound, sales-tax, store specials, etc, etc), or a cell-phone billing program (separate daytime, night, and weekend minutes, bill text messages, picture messages separately, etc).

like image 33
abelenky Avatar answered Jan 08 '23 02:01

abelenky