Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
you have "no clue" ??
okay, well first thing: how is this typing tutor supposed to work? what's your plan?
I'd think theres a few overall requirements....
(1) print some text to the screen that the person should type.
(2) start a timer, and begin collecting typed input.
(3) once they indicate they have stopped typing, stop the timer
(4) calculate total (elapsed) time, and the number of errors in their typed text.
(5) print results, allow them to try again or exit
then maybe draw a diagram of some functions, describe what task each function should do, use pseudo code to describe the functions inputs/outputs/return values, and indicated dependency direction of the functions.
and finally, start here:
int main()
{
// insert code here
}
Once you've got it filled out enough so that you can ask a reasonably specific and coherent question... come back here and post your code.
In the meantime, please ask your instructor why (s)he insists on using such a piece of crap compiler (Turbo C), as it is 15+ years out of date, employs non-standard C libraries, and virtually NO ONE in the industries of the modern world ever uses it???
write down their answer, then post it here please.
thanks.
.
jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
How about beginning with something simple like
Print out a sentence for the user to type in, say
"type in this line"
Then read a line of input from the user, say
"ttpe in tjis line"
Then what are you supposed to do (read your assignment)
- compare the line for errors?
- provide info that say "y" and "t" are close together on the keyboard as an explanation for the mistakes
- time how long it took to type in
- provide some kind of "speed and accuracy" output?
Maybe try simple programming exercises like
Press a key in 5 seconds
You pressed a key in 4.34 seconds.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
yeah, theres obviously a number of different ways to approach such a "tutor"
i think SANZ is going to have to give us a bit more info.
it does sound like a fun little project.
jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
your instructor is smoking crack. learning to code on Turbo C will only hinder you, by teaching you non-standard C that will not ever work on any compiler used by the real world. you'll have to UNLEARN half the stuff you learn. Oh well, I'm going to drop the issue.
your program, considering your skills, i think is too ambitious to try and tackle all at once. make a smaller program to do simple tasks, and don't even think about graphics.
repeating what i said earlier, i think the following requirements would be a good start, and give you some simple functionality that you could build more complex functions into later:
(1) print some text to the screen that the person should type.
(2) start a timer, and begin collecting typed input from user.
(3) once the user indicates they have stopped typing, stop the timer
(4) calculate total (elapsed) time, and the number of errors in their typed text compared to the original text.
(5) print test results, allow them to try again or exit
technically this is more of a "typing test" than a "tutor", but all of the functions that you will have to code for this example, are functions that will be needed by a more complex typing tutor, so you won't be wasting your time.
it would be a good place to start, and would give you something tangible to show when completed.
.
jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
sanz, perhaps if you could post your code, we could see where you're having troubles.
jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
For a beginning student, TC can work fine. There's no doubt TC is the easiest and the fastest IDE to set up, and get help in.
It works fine in XP and all earlier versions of Windows.
Naturally code blocks or visual express would be better choices, but they can't be installed and get the student working, as fast and easy.
Before you start your program, carefully think out what you want the program to do, step by step. Write out some pseudo code. Try to design it, more than stumble upon something that might suffice.
Worst thing to do is the obvious - sit down at the computer and start coding up "something" right away for your program.
We will help you with the C language part of it (although you need to show work on this part, as well). Before that however, YOU need to decide what you want your program to do - there are hundreds of ways to make a typing tutor program, work. Only you can decide on the design you want.
Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185