CodeGym /Courses /Java Core /Bonus task | Lesson 11 | Level 3

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."

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!
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!
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.
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.
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".
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.
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!
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.
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.
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.

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

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?
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
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 (40)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Anonymous #11533978 Level 26, Bilbao, Spain
28 July 2024
This topic is completely/really hard and confusing to me.
Simphiwe Level 33, Johannesburg, South Africa
10 March 2023
Question. How do you read lines from a file, instead of reading each character?
Evgeniia Shabaeva Level 37, Budapest, Hungary
8 July 2024
For instance, using scanner.nextLine();
Michael Amann Level 22, United States of America, United States
16 June 2022
The tester is "kaput."
Michael Amann Level 22, United States of America, United States
1 June 2022
Different IDEs yield different results. 😑 Clearly no one cares about variables that are "descriptive..." Today(String type) { this.type = type; }
whoseunassailable Level 28, India, India
27 February 2022
For the "reading a file task", my solution was entirely correct and yet it was having trouble with one condition of "Display the contents of the file on the screen". I tried the codegym solution and yet the same was happening. It happened in the IntelliJ Idea. When i run my code in the browser, it worked like a charm. So, i hope the CodeGym team will fix it asap.
Harward Tony Stark Level 21, Tashkent, Uzbekistan
3 May 2023
Yeah. This is the very problem I have faced with too. It took me many times to realize rather smth wrong not with my solution but theirs. Please, CodeGym members take it into serious account.
Stanislav Mayer Level 15, Czech Republic
24 February 2022
Should you need to refresh your memory about Inputs / Outputs, here you can find the corresponding article: Reading from the keyboard: "readers"
TheLordJackMC Level 39, Princeton, idk somewhere
15 July 2021
i thought captain skittles was, well, a captain. but he's a general now? good job??? who's in charge of the military anyways
ImDevin Level 15, Old Town, United States
4 June 2021
multiple, separated classes & interfaces. starting to look like a real program. some of the tasks were pretty challenging. moving on. happy coding :)
20 May 2021
Robot wars had quite a few syntax and logic errors along with moving of variable declarations between modules. Very tricky, but so satisfying!
Jurij Thmsn Level 29, 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?
Frolov Viktor Level 18, Nantes, France
3 December 2021
I have read this article and I think it is helpful. https://codegym.cc/groups/posts/append-method-in-java