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)
Extracted 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
Extracted 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ı.