a.Write the method that finds the first 4 numbers out of 100 randomly generated numbers. After the numbers are generated in main, they should be sent to the method given as an example below and the smallest four numbers should be found. Write the numbers found on the console screen in the main method.(will be coded in java) Method name: public static int[] smallestFindFirstFourth(int[] array) Note: Sorting algorithms or ready-made functions will never be used.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

a.Write the method that finds the first 4 numbers out of 100 randomly generated numbers. After the numbers are generated in main, they should be sent to the method given as an example below and the smallest four numbers should be found. Write the numbers found on the console screen in the main method.(will be coded in java)

Method name: public static int[] smallestFindFirstFourth(int[] array)

Note: Sorting algorithms or ready-made functions will never be used.

b.In the attached city list.txt file, the names of the provinces in Turkey are given in a single line according to the format given in Figure 1. In the application you will write, write the city names read from this file into the license plate list.txt file in the format shown in Figure 2. In more descriptive terms, citylist.txt is a file given to you. license plate list.txt is the file you will get with your code.

city list:

Adana, Adıyaman, Afyon, Ağrı, Amasya, Ankara, Antalya, Artvin, Aydın, Balıkesir, Bilecik, Bingöl, Bitlis, Bolu, Burdur, Bursa, Çanakkale, Çankırı, Çorum, Denizli, Diyarbakır, Edirne, Elazığ, Erzincan, Erzurum, Eskişehir, Gaziantep, Giresun, Gümüşhane, Hakkari, Hatay, Isparta, İçel (Mersin), İstanbul, İzmir, Kars, Kastamonu, Kayseri, Kırklareli, Kırşehir, Kocaeli, Konya, Kütahya, Malatya, Manisa, Kahramanmaraş, Mardin, Muğla, Muş, Nevşehir, Niğde, Ordu, Rize, Sakarya, Samsun, Siirt, Sinop, Sivas, Tekirdağ, Tokat, Trabzon, Tunceli, Şanlıurfa, Uşak, Van, Yozgat, Zonguldak, Aksaray, Bayburt, Karaman, Kırıkkale, Batman, Şırnak, Bartın, Ardahan, Iğdır, Yalova, Karabük, Kilis, Osmaniye, Düzce       (will be coded in java)

sehir listesi.txt- Not Defteri
Dosya Düzen Biçim Görünüm Yardım
Adana, Adıyaman, Afyon, Agrı, Amasya, Ankara, Antalya, Artvin, Aydın, Balıkesir, Bilecik
Şekil 1. Sadece isim olarak verilen Şehir listesi
Transcribed Image Text:sehir listesi.txt- Not Defteri Dosya Düzen Biçim Görünüm Yardım Adana, Adıyaman, Afyon, Agrı, Amasya, Ankara, Antalya, Artvin, Aydın, Balıkesir, Bilecik Şekil 1. Sadece isim olarak verilen Şehir listesi
Dosya Dozen Bigim Göründom Yardım
1 Adana
2 Adayaman
3 Afyonkarahisar
4 Agra
5 Amasya
6 Ankara
7 Antalya
8 Artvin
9 Aydın
e Balikesir
11 Bilecik
12 Bingöl
13 Bitlis
14 Bolu
15 Burdur
esung 9t
17 Canakkale
(18 Cankarı
20 Denizli
21 Diyarbakır
Şekil 2. Uygulama sonucunda elde edilen txt dosya yapısı.
Transcribed Image Text:Dosya Dozen Bigim Göründom Yardım 1 Adana 2 Adayaman 3 Afyonkarahisar 4 Agra 5 Amasya 6 Ankara 7 Antalya 8 Artvin 9 Aydın e Balikesir 11 Bilecik 12 Bingöl 13 Bitlis 14 Bolu 15 Burdur esung 9t 17 Canakkale (18 Cankarı 20 Denizli 21 Diyarbakır Şekil 2. Uygulama sonucunda elde edilen txt dosya yapısı.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY