Skip to content

OpenGenus/typing-speed-test-in-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Typing Speed Test in Java

A simple Java program that measures typing speed and accuracy. The user can select to type the full text or type for one minute. The results are displayed in characters per second and accuracy as a percentage.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need the following software to be able to run this program:

  • Java SE Development Kit (JDK) 8 or later

Installing

  • Clone the repository to your local machine:

git clone https://github.com/<username>/typing-test.git

  • Compile the java source files:

javac Main.java TypingTest.java Text.java

  • Run the program:

java Main

Files

Main.java

This is the main driver class that runs the typing test. It contains the main method that creates an instance of the TypingTest class and calls its methods to perform the typing test.

TypingTest.java

This class contains the logic for the typing test. It takes a piece of text as input, displays it to the user and measures their typing speed. The user is given a certain amount of time to type the text as accurately and quickly as possible. The class calculates the user's typing speed and returns the results.

Text.java

This class contains a piece of text that is used as the input for the typing test. The text can be any string of your choice.

Visit the link for a detailed explanation of the console application.