"Sa wakas, tapos ka na. Pagod na akong subukang panatilihin sa isip ko ang iyong mga gawain. Narito ang ilang higit pa upang mapanatili kang maganda:"
10
Gawain
Java Syntax, antas, aralin
Playing Javarella
Javarella 1.0: Dealing numbers into three lists. Here are the rules: Javarella receives a list of 20 numbers. You need to check which of them is divisible by 3, which by 2, and which are divisible by neither. Then the program needs to save them to separate lists. Numbers divisible by both 3 and 2 (for example 6) go into both lists. Let's dive in!
2
Gawain
Java Syntax, antas, aralin
Words in reverse
If half or more of your actions seem to be meaningless, don't worry: you probably clearly understand the fragility of existence, and can therefore become a great programmer. Then again, sometimes it just seems that way. Here's some meaning for your life: enter 5 words and put them in a list. Remove the third element of the list, and display the remaining elements in reverse order.
5
Gawain
Java Syntax, antas, aralin
More Sam-I-Am
From now on, green eggs and ham will be overshadowed by lists. Or would the opposite be better? Here's our task: add some of Dr. Suess's famous words to a list: "Sam", "I", "Am". After each word, we'll insert "Ham" into the list. And display the result on the screen. Each list element on a new line.
10
Gawain
Java Syntax, antas, aralin
R or L
Our friends from Planet Chi-Knees have an unusual problem: they have a really hard time distinguishing between the letters "r" and "l". We decided to help them with this task. The experimental fix method will remove from a string list all words containing the letter "r", and it will duplicate all words containing the letter "l".
5
Gawain
Java Syntax, antas, aralin
Duplicating words
Let's write an echo program. It repeats everything it hears. More precisely, everything in a list of 10 strings. The echo program will actually accomplish this by creating a list of 10 words (we'll enter strings from the keyboard and add them to the list), and the doubleValues method will basically duplicate the words in a specific way. Then we'll display the resulting echo. Piece of cake.
5
Gawain
Java Syntax, antas, aralin
Checking the order
Hierarchy is a dictator's first tool for maintaining order and military control. We'll think about a dictatorship later. For now, let's make a list of 10 words. Let's use the keyboard to enter them. Our task is to check whether the list is ordered by increasing string length. If not, we'll display the index of the first element that violates this order.