undefined

Bonus task | Lesson 11 | Level 3

Java Core
Level 3 , Lesson 11
Available

"Hey, soldier!"

"Good day, General!"

"I've got awesome news for you. Here are some exercises to reinforce your skills. Do them every day and your skills will grow at an insane speed. They were created especially for IntelliJ IDEA."

"Those previous exercises were for rookies. I've added some more advanced bonus exercises for the old-timers. Just for veterans."

undefined
3
Task
Java Core, level 3, lesson 11
Locked
Incorrect lines
Here is a Button interface, chock-full of incorrect lines of code. You've probably already guessed that you need to remove them without stepping outside the bounds of the stipulated requirements. Good luck with that!
undefined
3
Task
Java Core, level 3, lesson 11
Locked
Nice weather
Here is a Today class. You need to implement the Weather interface and the Weather interface's getWeatherType method in the Today class. Think about the relationship between the parameter type and the getWeatherType() method. Let's get going!
undefined
8
Task
Java Core, level 3, lesson 11
Locked
Reading a file
We've received a new task from Captain Squirrels: read a file name from the console. And then display the contents of the file in the console (on the screen). Don't forget to free up resources by closing the streams for file input and keyboard input.
undefined
16
Task
Java Core, level 3, lesson 11
Locked
Writing to a file from the console
Now you need to write something to a file. You need to first read the file name from the console, then read lines entered by the user until the user enters "exit". Finally, write all the entered lines to the file, each on a new line.
undefined
8
Task
Java Core, level 3, lesson 11
Locked
Neo
Let's initialize our first user under the name Neo. To do this, implement the DBObject interface and its initializeIdAndName method in the User class so that the program runs and displays "The user's name is Neo, id = 1".
undefined
3
Task
Java Core, level 3, lesson 11
Locked
Fixing bugs
We fix code which doesn't work the way it should, or which doesn't work at all. You need to rework inheritance in the classes and interfaces so the program compiles and runs as it should. The Hobby class must inherit the Desire and Dream interfaces.
undefined
8
Task
Java Core, level 3, lesson 11
Locked
SimpleObject interface
In this task, you are going to create a StringObject class. And make it implement the SimpleObject interface using a String parameter. And, of course, the program must also run and compile. Let's go!
undefined
3
Task
Java Core, level 3, lesson 11
Locked
Updatable interface in the Screen class
Captain Squirrels presents yet another great program that CodeGym students must create! This time, you'll need to create an Updatable interface and implement it in the Screen class.
undefined
3
Task
Java Core, level 3, lesson 11
Locked
One method in a class
In this task, you need to implement the Fox class's inheritance of the Animal interface. Don't delete any methods. Instead, you need to edit the code so that the getName method is the only method in the Fox class.
undefined
3
Task
Java Core, level 3, lesson 11
Locked
Compiling the program
Here you have been given an ordinary fox and its descendant, a big fox. Fix the Fox and BigFox classes so that the program compiles. This task does not involve creating instances of the base class. It is also probably better to not mess with the main method.
undefined
16
Task
Java Core, level 3, lesson 11
Locked
Sorting even numbers from a file
If one ordered isomorph isn't sure if another ordered isomorph is sober, he asks him to pass a simple test: read a file name from the console, read a set of numbers from the file, sort only the even numbers in ascending order, and then display them on the screen. Can you pass?
undefined
16
Task
Java Core, level 3, lesson 11
Locked
Turnip
A classic Terranian tale tells of a curious way to remove overgrown root vegetables from the ground. In the scientific literature, it is known as the "Grandma behind Grandpa" method. We invite you to dig deep into this farming know-how by making the Person class implement the TurnipItem interface and a method that will display a phrase like ' behind
undefined
16
Task
Java Core, level 3, lesson 11
Locked
Robot wars
A young robot decided to update his software in preparation for battle with another robot named Bender-2. But the update still hasn't finished. Now this is your problem... whoops, sorry, I meant the task is yours. But don't worry: Robot wars aren't like battles in the flesh. They are a battle of logic.
Comments (28)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Jurij Thmsn Level 22 Flensburg Germany
17 February 2021
In the downloadable "correct solution" a "StringBuilder" is frequently used. Is there a lesson or an article available on CodeGym?
Oliver Heintz Level 18 Mustang United States
4 December 2020
Wow, gotta say, I stumbled a lot on the input and output streams, but by the time I got to Robot Wars I felt pretty confident. And while it took some time to work through the logic of this one, I really felt like I was unraveling a knot the entire time, solving one small problem at a time, and I passed verification on my first attempt. Not sure that's exactly what they had in mind for a solution, but it passed, so I guess I'll call it a victory and move on to level 14. Having genuine fun, and learning a lot, too.
Karas Level 19 Tampa United States
21 November 2020
I wish I could do them fully on the website. Some of these exercises need inteliJ and... well I wish I could do them in the website.
Pavel Naumovich Level 16 Chippenham United Kingdom
31 October 2020
Nice, well done everyone who made it here !
Agent Smith Level 38
26 August 2020
Good exercises.
Lucas Hoage Level 14 Savannah United States
10 June 2020
That's tough as nails to follow. Once you figure out what attack and defend are doing and how it's rolling itself over and over, you'll begin to see where you can edit the logic. This was a really fun exercise, I hope there's more like it in the future to help understand the template to follow when designing.
Ntuthuko Xaba Level 18 Johannesburg South Africa
4 April 2020
I just realised that there are multiple files in some of these tasks. Is there anyway of seeing these in IntelliJ?
Manish Sinha Level 26 london United Kingdom
2 April 2020
Last task was really awesome ..
MaGaby2280 Level 31 Guatemala City Guatemala
3 December 2019
That last task was hard... If only the instructions could have been clearer...
Binesh Level 16 India
26 November 2019
Thanks CodeGym for getting me into programming. Now, where's my dark matter. :)