This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.badlogic.gdx.assets.AssetDescriptor; | |
| import com.badlogic.gdx.assets.AssetLoaderParameters; | |
| import com.badlogic.gdx.assets.AssetManager; | |
| import com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader; | |
| import com.badlogic.gdx.assets.loaders.FileHandleResolver; | |
| import com.badlogic.gdx.files.FileHandle; | |
| import com.badlogic.gdx.graphics.g2d.TextureAtlas; | |
| import com.badlogic.gdx.utils.Array; | |
| import com.badlogic.gdx.utils.ObjectMap; | |
| import com.badlogic.gdx.utils.ObjectMap.Entry; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.badlogic.gdx.Gdx; | |
| import com.badlogic.gdx.files.FileHandle; | |
| import com.badlogic.gdx.graphics.Texture; | |
| import com.badlogic.gdx.graphics.g2d.BitmapFont; | |
| import com.badlogic.gdx.graphics.g2d.DistanceFieldFont; | |
| import com.badlogic.gdx.graphics.g2d.TextureAtlas; | |
| import com.badlogic.gdx.graphics.g2d.TextureRegion; | |
| import com.badlogic.gdx.scenes.scene2d.ui.Skin; | |
| import com.badlogic.gdx.utils.Array; | |
| import com.badlogic.gdx.utils.Json; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.bonus03; | |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.util.Arrays; | |
| /* Задача по алгоритмам | |
| Задача: ввести с клавиатуры 30 чисел. Вывести 10-е и 11-е минимальные числа. | |
| Пояснение: | |
| Самое минимальное число – 1-е минимальное. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.bonus02; | |
| import java.io.*; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| /* Нужно добавить в программу новую функциональность | |
| Задача: Программа вводит с клавиатуры пару (число и строку) и выводит их на экран. | |
| Новая задача: Программа вводит с клавиатуры пары (число и строку), сохраняет их в HashMap. | |
| Пустая строка – конец ввода данных. Числа могу повторяться. Строки всегда уникальны. Введенные данные не должны потеряться! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.bonus01; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| /* Нужно исправить программу, чтобы компилировалась и работала | |
| Задача: Программа демонстрирует работу HashMap: вводит с клавиатуры набор пар (номер и строку), помещает их в HashMap и выводит на экран содержимое HashMap. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.home10; | |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| /* Безопасное извлечение из списка | |
| Создать список целых чисел. Ввести с клавиатуры 20 целых чисел. Создать метод по безопасному извлечению чисел из списка: | |
| int safeGetElement(ArrayList<Integer> list, int index, int defaultValue) | |
| Метод должен возвращать элемент списка (list) по его индексу (index). Если в процессе получения элемента возникло исключение, его нужно перехватить, и метод должен вернуть defaultValue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.home09; | |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| /* Одинаковые слова в списке | |
| Ввести с клавиатуры в список 20 слов. Нужно подсчитать количество одинаковых слов в списке. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.home08; | |
| import java.util.ArrayList; | |
| /* Массив списков строк | |
| Создать массив, элементами которого будут списки строк. Заполнить массив любыми данными и вывести их на экран. | |
| */ | |
| public class Solution | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.home07; | |
| /* Расставьте минимум static-ов | |
| Расставьте как можно меньше модификаторов static так, чтобы пример скомпилировался. | |
| */ | |
| public class Solution | |
| { | |
| public int A = 5; | |
| public static int B = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.javarush.test.level10.lesson11.home06; | |
| /* Конструкторы класса Human | |
| Напиши класс Human с 6 полями. Придумай и реализуй 10 различных конструкторов для него. Каждый конструктор должен иметь смысл. | |
| */ | |
| public class Solution | |
| { | |
| public static void main(String[] args) | |
| { |