- Generate a random number within a specified range, such as 1 to 100.
- Prompt the user to enter their guess for the generated number.
- Compare the user's guess with the generated number and provide feedback on whether the guess is correct, too high, or too low.
- Repeat steps 2 and 3 until the user guesses the correct number. You can incorporate additional details as follows:
- Limit the number of attempts the user has to guess the number.
- Add the option for multiple rounds, allowing the user to play again.
- Display the user's score, which can be based on the number of attempts taken or rounds won.
Run javac NumberGameGUI.java
in terminal
then java NumberGameGUI
Input: Take marks obtained (out of 100) in each subject. Calculate Total Marks: Sum up the marks obtained in all subjects. Calculate Average Percentage: Divide the total marks by the total number of subjects to get the average percentage. Grade Calculation: Assign grades based on the average percentage achieved. Display Results: Show the total marks, average percentage, and the corresponding grade to the user
Run javac GradeCalculator.java
in terminal
then java GradeCalculator
- Create a class to representthe ATM machine.
- Design the user interface for the ATM, including options such as withdrawing, depositing, and checking the balance.
- Implement methods for each option, such as withdraw(amount), deposit(amount), and checkBalance().
- Create a class to represent the user's bank account, which stores the account balance.
- Connect the ATM class with the user's bank account class to access and modify the account balance.
- Validate user input to ensure it is within acceptable limits (e.g., sufficient balance for withdrawals).
- Display appropriate messages to the user based on their chosen options and the success or failure of their transactions.
Run javac ATMGUI.java
in terminal
then java ATMGUI
- Quiz Questions and Options: Store quiz questions along with multiple-choice options and correct answers.
- Timer: Implement a timer for each question to limit the time to answer.
- Question Display: Present one question at a time with multiple-choice options.
- Answer Submission: Allow users to select an option and submit their answer within the given time.
- Score Calculation: Keep track of the user's score based on correct answers. Result Screen: Display the final score and a summary of correct/incorrect answers.
Run javac QuizApplication.java
in terminal
then java QuizApplication
Course Database: Store course information, including course code, title, description, capacity, and schedule. Student Database: Store student information, including student ID, name, and registered courses. Course Listing: Display available courses with details and available slots. Student Registration: Allow students to register for courses from the available options. Course Removal: Enable students to drop courses they have registered for.
Run javac StudentCourseRegistrationSystem.java
in terminal
then java StudentCourseRegistrationSystem