hello i have a maze and im trying to find a paths in this maze. i want to create a stack and also want to find paths which is created by letters. So i was trying to that if my paths values are started false  when i visit turns true in this way i do not visit again. when i see letters trying to put stack and should be stopped when see big "E" for example in this maze paths are aaaE, aabcccE. tahmin means in my language like estimate.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

hello i have a maze and im trying to find a paths in this maze. i want to create a stack and also want to find paths which is created by letters. So i was trying to that if my paths values are started false  when i visit turns true in this way i do not visit again. when i see letters trying to put stack and should be stopped when see big "E" for example in this maze paths are aaaE, aabcccE.

tahmin means in my language like estimate.

deger means in my language like value.

 

i was wondering I could not do stack and stack implementation and also if i have any other mistake can you help me in java language.

public class path01 {

   public char deger;
   public boolean tahmin = false;

   public path01(char deger) {
       this.deger = deger;
   }

   public char getDeger() {
       return deger;
   }

   public void setDeger(char deger) {
       this.deger = deger;
   }

   public boolean isTahmin() {
       return tahmin;
   }

   public void setTahmin(boolean tahmin) {
       this.tahmin = tahmin;
   }

  
}

public class driverc {
   private static path01[][] map = new path01[5][5];

   public static void main(String[] args) {
       // TODO Auto-generated method stub
       map[0][0] = new path01('+');
       map[0][1] = new path01('-');
       map[0][2] = new path01('+');
       map[0][3] = new path01('-');
       map[0][4] = new path01('+');
       map[1][0] = new path01('a');
       map[1][1] = new path01('a');
       map[1][2] = new path01('a');
       map[1][3] = new path01('E');
       map[1][4] = new path01('|');
       map[2][0] = new path01('|');
       map[2][1] = new path01('b');
       map[2][2] = new path01('+');
       map[2][3] = new path01('+');
       map[2][4] = new path01('|');
       map[3][0] = new path01('|');
       map[3][1] = new path01('c');
       map[3][2] = new path01('c');
       map[3][3] = new path01('c');
       map[3][4] = new path01('+');
       map[4][0] = new path01('|');
       map[4][1] = new path01('-');
       map[4][2] = new path01('-');
       map[4][3] = new path01('E');
       map[4][4] = new path01('|');
print();

   }

   public static void print() {
       for (int i = 0; i < 5; i++) {
           for (int j = 0; j < 5; j++) {
               System.out.print(map[i][j].getDeger());

           }
           System.out.println();
       }
   }

   public static void traverse() {
       for (int i = 0; i < map.length; i++) {
           for (int j = 0; j < map[i].length; j++) {
               map[i][j].setTahmin(true);

           }
       }
   }
}

Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Stack
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education