# Source Code

## Module3.java

```java
import java.util.*;

public class Module3 {
    public static void main(String[] args) {
        System.out.println("Module 3 Part 1 Examples");
        // Create new Scanner object (don't delete!)
        Scanner in = new Scanner(System.in);
        // menu variables
        boolean done = false;
        String choice;
        // do while menu loop
        do {
            System.out.println("E1 - Example 1");
            System.out.println("E2 - Example 2");
            System.out.println("E3 - Example 3");
            System.out.println("E4 - Example 4");
            System.out.println("E5 - Example 5");
            System.out.println("Q - Quit");
            System.out.print("Choice: ");
            choice = in.nextLine();
            switch (choice) {
                case "E1":
                    System.out.println("Example 1 Main Method");
                    // example1 method call

                    break;
                case "E2":
                    System.out.println("Example 2");
                    // example2 method call
 
                    break;
                case "E3":
                    System.out.println("Example 3");
                    // example3 method call

                    break;
                case "E4":
                    System.out.println("Example 4");
                    // example4 method call

                    break;
                case "E5":
                    System.out.println("Example 5");
                    // example5 method call

                    break;
                // quit and default cases
                case "Q":
                    System.out.println("Quit");
                    done = true;
                    break;
                default:
                    System.out.println("Invalid Choice");
                    break;
            }
        } while (!done);

        // close the Scanner (don't delete!)
        in.close();
    }
    // example1 method

    // example2 method
    
    // example3 method

    // example4 method

    // example5 method
 
}
```

## Module3\_2.java

```java
import java.util.*;

public class Module3_2 {
    public static void main(String[] args) {
        System.out.println("Module 3 Part 2 Examples");
        // Create new Scanner object (don't delete!)
        Scanner in = new Scanner(System.in);
        // menu variables
        boolean done = false;
        String choice;
        // do while menu loop
        do {
            System.out.println("E1 - Example 1");
            System.out.println("E2 - Example 2");
            System.out.println("E3 - Example 3");
            System.out.println("E4 - Example 4");
            System.out.println("E5 - Example 5");
            System.out.println("E6 - Example 6");
            System.out.println("Q - Quit");
            System.out.print("Choice: ");
            choice = in.nextLine();
            switch (choice) {
                case "E1":
                    System.out.println("Example 1");
                    // Create Counter object
                    
                    // Increment counter
                   
                    // Printer counter value
                    
                    // Reset counter value
                    
                    // Printer counter value (again)
                    
                    // click twice and print the value
                    
                    

                    break;
                case "E2":
                    System.out.println("Example 2");
                    // Create two Dice object
                    
                    // Print their values
                    
                    // roll the dice
                    
                    // Print their values
                    
                    break;
                case "E3":
                    System.out.println("Example 3");
                    // create sam object
                    
                    // deposit $100
                    
                    // withdraw $50
                    
                    break;
                case "E4":
                    System.out.println("Example 4");
                    // teddi object
                    
                    // deposit $500
                    
                    // withdraw $499
                    
                    break;
                case "E5":
                    System.out.println("Example 5");
                    // devin object
                    
                    // withdraw $250
                    
                    break;
                case "E6":
                    System.out.println("Example 6");
                    // jada object
                    
                    // withdraw $2500
                    
                    break;
                // quit and default cases
                case "Q":
                    System.out.println("Quit");
                    done = true;
                    break;
                default:
                    System.out.println("Invalid Choice");
                    break;
            }
        } while (!done);

        // close the Scanner (don't delete!)
        in.close();
    }
}
```

## Counter.java

```java
// class header


    // private instance variable(s)
    

    // Constructor
    

    // accessor method(s)
    

    // mutator method(s)
    



```

## Dice.java

```java
import java.util.*;

// class header
public class Dice {
    // private instance variable


    // Constructor


    // roll method()

        // assign faceValue to a random number


    // getFaceValue method


    // toString method returns a string representation of this die.
    

```

## BankAccount.java

```java
// header


    // private instance variables
 

    // constructors
    // no argument constructor

    // one argument constructor

    // two argument constructor

    // three argument constructor

    // methods
    // deposit method
 
    // withdraw method
    
    // getBalance method

    // toString method returns a string representation of this die.
    
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.cs2421.com/module-3/source-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
