This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| import java.util.ArrayList; | |
| import java.util.regex.Pattern; | |
| import java.util.regex.Matcher; | |
| public class Assignment3 { | |
| public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| public class JFrameCalculator { | |
| private JFrame frame; // The main application window | |
| private JTextField textField; // Text field for displaying and inputting numbers and operators | |
| private String currentInput = ""; // Stores the current input string | |
| private double currentResult = 0.0; // Stores the current calculated result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| import java.net.URL; | |
| import java.util.Random; | |
| public class RPSGame { | |
| private JFrame mainFrame; |