GithubHelp home page GithubHelp logo

java-test-4's Introduction

Zadanie 1

Proszę stworzyć klasę TreeNode, która będzie zawierała 3 pola: left, right i value. Pole value powinno być typu char, pola left i right powinny być typu TreeNode. Dostęp do pól powinien się odbywać przez settery i gettery.

Zadanie 2

Proszę stworzyć klasę LinkedList, która będzie implementowała listę łączoną, w której będzie można przechowywać obiekty typu TreeNode. Metody, które należy zaimplementować to:

isEmpty - zwraca wartość logiczną true jeżeli lista jest pusta, w przeciwanym razie false;

push - dodaje obiekt na przód listy;

pop - zdejmuje obiekt z przodu listy i go zwraca;

peek - zwraca obiekt z przodu listy bez zdejmowania go;

Zadanie 3

Proszę zaimplementować w klasie Tree, drzewo binarne. Metody, które należy zaimplementować to:

add - dodaje węzeł z podanym charem;

printTree - drukuje drzewo w postaci listy;

Zadanie 4

W klasie Tree proszę zaimplementować metodę parseFile, która wczyta plik na podanej ścieżce, a następnie wczyta podane tam wartości do drzewa. Plik do wczytania nosi nazwę example i jest zawarty w repozytorium.

java-test-4's People

Contributors

cato-old avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.