Important alert: (current site time 10/20/2014 11:22:51 PM EDT)
 

VB icon

Typing Tutor

Email
Submitted on: 9/12/2001 9:24:22 AM
By: Nadir Ali Shah  
Level: Advanced
User Rating: Unrated
Compatibility: C, C++ (general)
Views: 4579
author picture
(About the author)
 
     increase your typing speeed, this is just a typing tutor.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
//**************************************
// Name: Typing Tutor
// Description:increase your typing speeed, this is just a typing tutor.
// By: Nadir Ali Shah
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2458&lngWId=3//for details.//**************************************

#include<conio.h>
#include<iostream.h>
#include<dos.h>
#include<stdlib.h>
char list[500]={"asdfgf ;lkjhj asdfgf ;lkjhj asdfgf ;lkjhj asdfgf ;lkjhj asdfgf ;lkjhj qwertr poiuyu qwertr poiuyu qwertr poiuyu qwertr poiuyu qwertr poiuyu azxcvc .,mnbn azxcvc .,mnbn azxcvc .,mnbn azxcvc .,mnbn azxcvc .,mnbn"};
class typingtutor
{
private:
char ch;
int mistakes;
int a,z,count;
public:
typingtutor()
{
mistakes=0;
a=0;
z=7;
count=0;
}
void about (void);
void layout (void);
void printtextlines (void);
int logic (void);
};
void typingtutor::about (void)
{
gotoxy(35,9);
cout<<"TYPING TUTOR";
gotoxy(25,10);
cout<<"MADE BY Nadir Ali Shah";
gotoxy(24,12);
cout<<"Dedicated to my Love";
getch();
clrscr();
}
void typingtutor::layout (void)
{
textcolor(YELLOW);
clrscr();
int row,col;
for(row=1,col=1;col<=80;col++)
{gotoxy(col,row);
cout<<"*";}
for(col=80,row=1;row<=24;row++)
{gotoxy(col,row);
cout<<"*";}
for(row=24,col=80;col>=1;col--)
{gotoxy(col,row);
cout<<"*";}
for(col=1,row=24;row>=1;row--)
{gotoxy(col,row);
cout<<"*";}
gotoxy(35,3);
cout<<"TYPING TUTOR";
gotoxy(35,4);
cout<<"************";
gotoxy(34,23);
cout<<"type 1 to exit";
}
void typingtutor::printtextlines (void)
{
gotoxy(5,6);
for(int d=0; d<70; d++)
{
cout<<list[d];
}
gotoxy(5,11);
for(int e=70; e<140; e++)
{
cout<<list[e];
}
gotoxy(5,16);
for(int f=140; f<210; f++)
{
cout<<list[f];
}
}
int typingtutor::logic (void)
{
gotoxy(5,8);
lab:
if(a==70)
{
count=0;
z=13;
gotoxy(5,z);
}
if(a==140)
{
count=0;
z=18;
gotoxy(5,z);
}
if(a==210)
{
gotoxy(35,20);
cout<<"GOOD TRY"<<" "<<mistakes<<" "<<"MISTAKES";
cout<<endl;
gotoxy(25,21);
cout<<"Would you like to do practise again y/n";
char continu;
continu=getch();
if(continu=='y')
return(1);
else
{
clrscr();
exit(1);
}
}
textcolor(4);
ch=getche();
if(ch=='\r')
{
gotoxy(count+5,z);
goto lab;
}
if(ch=='\b')
{
gotoxy(count+5,z);
goto lab;
}
else if(ch=='1')
{
clrscr();
exit(1);
}
else if(ch!=list[a])
{
sound(900);
delay(100);
nosound();
mistakes++;
a++;
count++;
goto lab;
}
else if(ch==list[a])
{
a++;
count++;
goto lab;
}
return(0);
}
void main (void)
{
typingtutor ob;
ob.about();
top:
typingtutor object;
object.layout();
object.printtextlines();
int retun=object.logic();
if(retun==1)
goto top;
getche();
}


Other 12 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.