Conteúdo do Curso
Java Data Structures
2. Additional Data Structures
Java Data Structures
Challenge (Deque Practice)
Task
In the previous chapter, we implemented a system with two buttons, forward
and backward
, using the deprecated Stack
data structure.
In this chapter, your task is to recall the logic we used to implement the BrowserHistory
class and implement it using the Deque
data structure.
Try not to peek at the previous chapter and complete this task on your own—so to speak, "recode the code." This is also excellent practice with GitHub, which will be beneficial for you.
An interface with all the methods has been created in the code available on GitHub via the link below. Your task is to create a class implementation and implement this interface by overriding all its methods.
Once you finish, run the tests that I have written for you; it will automatically check your solution.
You can also perform intermediate tests in the main
class. Overall, I rely on your honesty and independence. A true programmer should be able to understand code independently! Good luck!
backStack
, forwardStack
, and currentUrl
.implements
keyword and override all methods of the BrowserHistory
interface.Deque
or Stack
methods you've learned earlier. Remember that Deque
is a modern and superior replacement for the Stack data structure.Tudo estava claro?
Conteúdo do Curso
Java Data Structures
2. Additional Data Structures
Java Data Structures
Challenge (Deque Practice)
Task
In the previous chapter, we implemented a system with two buttons, forward
and backward
, using the deprecated Stack
data structure.
In this chapter, your task is to recall the logic we used to implement the BrowserHistory
class and implement it using the Deque
data structure.
Try not to peek at the previous chapter and complete this task on your own—so to speak, "recode the code." This is also excellent practice with GitHub, which will be beneficial for you.
An interface with all the methods has been created in the code available on GitHub via the link below. Your task is to create a class implementation and implement this interface by overriding all its methods.
Once you finish, run the tests that I have written for you; it will automatically check your solution.
You can also perform intermediate tests in the main
class. Overall, I rely on your honesty and independence. A true programmer should be able to understand code independently! Good luck!
backStack
, forwardStack
, and currentUrl
.implements
keyword and override all methods of the BrowserHistory
interface.Deque
or Stack
methods you've learned earlier. Remember that Deque
is a modern and superior replacement for the Stack data structure.Tudo estava claro?