CodeGym /Courses /Java Core /Bonus task | Lesson 10 | Level 10

Bonus task | Lesson 10 | Level 10

Java Core
Level 10 , Lesson 10
Available

"Hello, Amigo! You've gotten a little soft! Here are your exercises. If you run into difficulties, check with your colleagues. They'll definitely help."

6
Task
Java Core, level 10, lesson 10
Locked
Minimum changes
With minimum code changes, make it possible to serialize the C class.
12
Task
Java Core, level 10, lesson 10
Locked
Deserialization
Serialized A or B objects are written to the stream that is passed in. Deserialize the object in the getOriginalObject method. If an exception occurs, display a message and return null. Implement the Serializable interface where necessary.
20
Task
Java Core, level 10, lesson 10
Locked
Find the bugs
For some reason, errors are occurring when serializing/deserializing B objects. Find the problem and fix it. The A class should not implement the Serializable and Externalizable interfaces. There is no error in the B class's signature :). There are no errors in the main method.
6
Task
Java Core, level 10, lesson 10
Locked
Correct the mistake. Serialization
After deserializing a Solution object, map m was discovered to have no data :( Fix 1 bug.
6
Task
Java Core, level 10, lesson 10
Locked
Serializing people
Serialize the Person class in the standard way. Add the transient modifier to some fields, if necessary.
6
Task
Java Core, level 10, lesson 10
Locked
Serialization is prohibited
Block serialization of the SubSolution class using the NotSerializableException. Don't change the method signatures.
20
Task
Java Core, level 10, lesson 10
Locked
Overriding serialization in a thread
Serializing/deserializing the Solution class doesn't work. Fix the bugs without changing method or class signatures. The main method is not tested. Write the verification code yourself in the main method: 1) create an instance of the Solution class 2) write data to it (writeObject) 3) serialize the
12
Task
Java Core, level 10, lesson 10
Locked
Making the right conclusion
Arrange calls to the superclass's methods and access modifiers to achieve the following screen output: C class, method2 A class, method2 A class, method1 B class, method1 1. Only one of the superclass's methods can be called from each method. 2. Only one of the class's methods can be called from e
12
Task
Java Core, level 10, lesson 10
Locked
Introducing graphs
Read the additional materials on serialization of graphs. The Solution class has a directed planar graph containing cycles and loops. For example, http://edu.nstu.ru/courses/saod/images/graph1.gif Serialize Solution. The direction of all of the edges must remain the same.

"You did everything already? Well, here are some exercises that are even more difficult:"

20
Task
Java Core, level 10, lesson 10
Locked
Number algorithms
Suppose the number S consists of M digits. For example, if S = 370, then M (the number of digits) = 3 Implement the getNumbers method. Among natural numbers less than N (long), it should find all the numbers satisfying the following criterion: The number S is equal to the sum of its digits raised in the Mth
12
Task
Java Core, level 10, lesson 10
Locked
Rectangle algorithms
1. Here we have a two-dimensional N*N array that contains several rectangles. 2. The various rectangles do not touch or overlap. 3. The interior of each rectangle is filled with 1s. 4. The array values have the following meaning: 4.1) a[i, j] = 1 if element (i, j) belongs to a rectangle 4.2) a[i, j]
20
Task
Java Core, level 10, lesson 10
Locked
Word search
1. We have a two-dimensional array that contains lowercase letters. 2. The detectAllWords method must find all the words in the wordSearch array. 3. The element(startX, startY) must correspond to the first letter of the word, while the element(endX, endY) corresponds to the last letter. text is the
Comments (32)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Hoist Level 4, San Diego, United States
7 March 2025
nameA: AB2B2, nameB: C33 nameA: AB2B2, nameB: C33
Evgeniia Shabaeva Level 40, Budapest, Hungary
25 November 2024
Wow, what a task! I'm not sure if CodeGym accepts recommendations, but I think the course would benefit a lot if it included a lesson on possible ways of searching through 2D arrays (I've found 5 in open sources) and, by all means, a good solid lesson on DFS (Depth-First Search), which is actually necessary for this type of tasks. I'm glad there are free materials on this topic on the internet, but it wouldn't hurt to provide the reguired theory here as well.
tomtom6789 Level 1, University Place, United States
5 October 2024
I'll be back to finish the last three exercises after I graduate from the course.😂
michal Level 34, Slovakia
15 April 2024
Rectangle Algorithms: { 1, 0, 0, 0} { 0, 1, 0, 0} { 0, 0, 1, 0} { 0, 0, 0, 1} { 1, 1, 0, 0} { 1, 0, 0, 0} { 0, 0, 1, 1} { 0, 0, 0, 1} this arrays contains 4 rectangles. according to the instructions, I assumed that in such a case the number of rectangles should be 0.
tomtom6789 Level 1, University Place, United States
5 October 2024
ill save last three problems for later haha
Hoist Level 4, San Diego, United States
26 January 2023
Started in 2018 / 2019 --- it's 2023 lol
Gellert Varga Level 23, Szekesfehervar, Hungary
28 December 2021
About "Number algorithms" (task2025), here is a very unique idea: the numbers in the task are called Armstrong numbers. There are only 89 Armstrong numbers in the decimal number system. All 89 are listed here: https://hu.wikipedia.org/wiki/Armstrong-szám or here: https://mathworld.wolfram.com/NarcissisticNumber.html - In a long[] array, put all of them that are less than Long.MAX_VALUE. - Make a loop that returns from this array all elements as an array that are less than the number passed to the getNumbers() method. - Exception: according to the links above, 0 is also an Armstrong number. But CG does not accept zero as an Armstrong number. So take zero out of the long[] array mentioned above. This solution was not my idea, it is from another user. The validator accepts it.
Naughtless Level 41, Olympus Mons, Mars
22 September 2021
It's been good Java Core. This level has refreshed me from my slump at levels 18 and 19.
TheLordJackMC Level 39, Princeton, idk somewhere
3 August 2021
"you've gotten a little soft" captain, im literally made of steel
ayhem bouabid Level 25, Tunis, Tunisia
18 June 2021
for those who do not only want to pass the tasks but also understand how Serialization and inheritance are related, I hope you find this article useful: https://www.geeksforgeeks.org/object-serialization-inheritance-java/
Jurij Thmsn Level 29, Flensburg, Germany
5 May 2021
This level demotivated me so much.