My code keeps getting 6 errors called "Cannot find symbol", I've gone over my code and cannot understand where this issue is coming from in the given locations
symbol: method prtIntro()
location: variable session of type Session
/tmp/H9bVKeD6Jn/Session.java:68: error: cannot find symbol
session.setTurns();
^
symbol: method setTurns()
location: variable session of type Session
/tmp/H9bVKeD6Jn/Session.java:71: error: cannot find symbol
for (int i = 0; i < session.getTurns(); i++) {
^
symbol: method getTurns()
location: variable session of type Session
/tmp/H9bVKeD6Jn/Session.java:75: error: cannot find symbol
game.setPairBonus();
^
symbol: method setPairBonus()
location: variable game of type Game
/tmp/H9bVKeD6Jn/Session.java:76: error: cannot find symbol
game.setSeven11Bonus();
^
symbol: method setSeven11Bonus()
location: variable game of type Game
/tmp/H9bVKeD6Jn/Session.java:77: error: cannot find symbol
game.setTotal();
^
symbol: method setTotal()
location: variable game of type Game
I've attached my code below so if someone could explain how I can resolve these issues I would greatly appreciate it
import java.util.Random;
import java.util.Scanner;
// The Game class handles the game logic and calculations
class Game {
private Random random = new Random();
private int die1;
private int die2;
private int sum;
private int pairBonus;
private int seven11Bonus;
private int total;
public void setDice() {
die1 = random.nextInt(6) + 1;
die2 = random.nextInt(6) + 1;
sum = die1 + die2;
}
public void sortDice() {
if (die1 > die2) {
int tempDie = die1;
die1 = die2;
die2 = tempDie;
}
}
// Other getter and setter methods for various calculations
// ...
// More methods for setting and getting bonuses and totals
// ...
}
// The Session class manages player information and interaction
class Session {
private Scanner scan = new Scanner(System.in);
private String name;
private int turns;
public void setName() {
System.out.print("Enter your name: ");
name = scan.nextLine();
}
// Other methods for getting player information and printing messages
// ...
public void prtOutro() {
System.out.println("Thanks for playing, " + name + "! See you next time.");
}
}
// The main Driver class runs the game
public class Driver {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
Game game = new Game();
Session session = new Session();
String playAgain;
// Get player name and display welcome message
session.setName();
session.prtIntro();
do {
// Get the number of turns from the player
session.setTurns();
// Loop through the specified number of turns
for (int i = 0; i < session.getTurns(); i++) {
// Set up the game for this turn
game.setDice();
game.sortDice();
game.setPairBonus();
game.setSeven11Bonus();
game.setTotal();
// Display the results of this turn
System.out.println("\nRoll " + (i + 1) + ":");
// Display other information using the game's getter methods
// ...
}
// Ask if the player wants to play again
System.out.print("\nDo you want to play again? (Y/N): ");
playAgain = input.next();
} while (playAgain.equalsIgnoreCase("Y"));
// Display a goodbye message
session.prtOutro();
}
}
I attempted to change the formatting of the code and experimented with deleting certain elements yet each came with a progressively different issue