Introduction java programming information



Download 1,4 Mb.
bet6/9
Sana30.04.2022
Hajmi1,4 Mb.
#595693
1   2   3   4   5   6   7   8   9
Bog'liq
kurs ishi 2

Population development
With a combined population of 145 million in the 2015 census (including Madura's 3.7 million),[37] which is estimated for 2014 at 143.1 million (including 3.7 million for Madura), Java is the most populous island in the world and is home to 57% of Indonesia's population. At over 1,100 people per km² in 2014, it is also one of the most densely populated parts of the world, on par with Bangladesh. Every region of the island has numerous volcanoes, with the people left to share the remaining flatter land. Because of this, many coasts are heavily populated and cities ring around the valleys surrounding volcanic peaks.
The population growth rate more than doubled in economically depressed Central Java in the latest 2010–2015 period vs 2000–2010, indicative of migration or other issues; there were significant volcanic eruptions during the earlier period. Approximately 45% of the population of Indonesia is ethnically Javanese,[38] while Sundanese make a large portion of Java's population as well.
The western third of the island (West Java, Banten, and DKI Jakarta) has an even higher population density, of nearly 1,500 per square kilometer and accounts for the lion's share of the population growth of Java. It is home to three metropolitan areas, Greater Jakarta (with outlying areas of Greater Serang and Greater Sukabumi), Greater Bandung, and Greater Cirebon.

Word game
Introduction
In word game, the computer program randomly picks up a secret word from a database of words and then shuffles it. The shuffled word is presented to the user and he is asked to guess the original word. The program ends when the user correctly guesses the word. The program also prints the number guesses made by the user for finding the correct answer.
The following Java program implements the word game. This program demonstrates a number of important language features such as getting user input, conditional checks, loops and string operations. It also demonstrates how a random word is picked up using the ThreadLocalRandom class, how a word is shuffled using array operations and how Scanner class can be used for user input.
Model
The most important part of this application is in the Game class, which includes the following functionality:

  • Generate a new solution;

  • Generate a new game from a solution;

  • Keep track of user input;

  • Check user input against generated solution;

  • Keep track of selected number;

  • Keep track of help is on or off.

Because the Game class extends Observable, it can and does notify observers when certain changes have been performed. This particular application contains two observers, ButtonPanel and WORDGamePanel. When the Gameclass executes setChanged() followed by notifyObservers(...), the observers will execute theirupdate(...) method.
Besides the Game class, the model consists of an enumeration called UpdateAction which will tell observers what kind of update has taken place.

Download 1,4 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish