Suggested Actions Part 2
Practice your concepts in this lesson.
We'll cover the following...
Know the Platform
Let’s consider a handful of platforms and how to get started in each. You’ll notice big differences in the workflow and programming style they demand. If possible, find a mentor who knows the platforms and who can help you program idiomatically.
To warm up, handle the console interface first. Get the program logic into shape on the simplest possible platform, a console application. This requires only one program file and no GUI beyond printf()
. We can pick any language we like, but we’ll discuss C in this section.
The objective is the classic Fahrenheit/Celsius converter. Feel free to do anything different. Here’s a quick specification:
-
The user should be able to specify the conversion as command-line arguments,
-c
(degrees Celsius) or-f
(degrees Fahrenheit). -
If no arguments are supplied, the program should prompt the user for degrees and units.
-
If the user provides arguments that cannot be converted meaningfully (non-numeric, out of range), the program needs to detect that and print an appropriate message.
This is mostly a warm-up exercise so you don’t get bogged down in the platform itself, but even a simple console application ...