Welcome to the Random Sentence Generator! This simple Java program generates random sentences using predefined lists of names, places, verbs, nouns, adverbs, and details. The sentences follow a specific structure, combining elements from each category to create amusing and unique phrases.
The program constructs sentences using the following format:
- Who from where:
[Name] from [Place]
- Action:
[Adverb] [Verb] [Noun]
- Detail: A random detail from a list
An example sentence could be:
Taylor from New York rapidly drives the getaway car near the sea.
- Randomized Output: Each sentence is randomly generated, ensuring a unique output every time.
- User Interaction: After each sentence, the program waits for the user to press [Enter] to generate a new one.
- Run the Program: Execute the main class
RandomSentencesGenerator
to start the generator. - Generate Sentences: Press [Enter] to generate a new random sentence.
To play the game, follow these steps:
- Clone the Repository: Clone or download the repository containing the project files.
- Compile the Java File: Use a Java compiler to compile the RandomSentencesGenerator.java` file.
javac RandomSentencesGenerator.java
- Java Development Kit (JDK) 8 or higher
- A console or terminal to run the Java program
-
RandomSentencesGenerator.java
: The main Java file containing the game's logic.
This project is part of a Java Fundamentals course designed to teach the following concepts:
- Understanding Java syntax and program structure
- Managing console input and output
- Generating random sentences using arrays
- Implementing loops and conditional statements
- Working with user input and building simple interactive features
- Implementing a graphical user interface (GUI)
This project is licensed under the MIT License - see the LICENSE file for details.
This project was developed as part of my learning at SoftUni from Programming Fundamentals with Java.