Genellikle db üzerinde çalışıyorum. Java'da çok bilgim yok ama öğrenmek istiyorum. şöyle bişey yapmam gerekiyor şimdi, bunun için interface ya da abstract kullanmak lazım galiba ama tam beceremedim o kısmı. Yardımcı olacak var mıdır?
Bi tane mağaza var, müşteriler belli günlerde alışveriş yaparsa indirim kazanıyor. Sallıyorum salı günü %10, pazartesi günü %40, pazartesi indirim yok.
senaryo: müşteri mağazaya giriyor. ->Magaza shop = new Magaza(); sonra alışverişini yapıyor. ->shop.setUrun("Gomlek"); shop.setFiyat(100); alışveriş yaptığı güne göre indirim uygulanıp fiyat düşecek. son olarak işlemini bitirir. -> shop.odeme();
(75 points) Write a Java method named checkValidity which takes an integer array as parameter and returns boolean value. The method/s must complete following tasks:
(a) The array length should be 16 at most. So you need to check the length first. If the length of the array is odd, then you should double the number that in even index (index starts at 1). If the length of the array is even, then you should double the odd index’s number (index starts at 0).
Example01: {1,2,3,4}
Example02: {3,5,7,2,2}
Example03: {0,0,0,5,7,0}
(b) If the number that is doubled, is greater than 9, you should replace the number with the sum of the digits (you may need a helper function to sum digits).
d-) Finally, divide this sum with 10 and if the remainder is equal to zero, this number is valid (true), otherwise not a valid number (false).
false
false
true
(25 points) Write a Java method named maskVowels that takes a String as a parameter and returns a String. The method counts the vowels of the given String. The number will be the mask key. Each letter should be changed according to mask key. You need to increase the ASCII of this letters by the mask key (you may need a helper function to count vowels).
Genellikle db üzerinde çalışıyorum. Java'da çok bilgim yok ama öğrenmek istiyorum. şöyle bişey yapmam gerekiyor şimdi, bunun için interface ya da abstract kullanmak lazım galiba ama tam beceremedim o kısmı. Yardımcı olacak var mıdır?
Bi tane mağaza var, müşteriler belli günlerde alışveriş yaparsa indirim kazanıyor. Sallıyorum salı günü %10, pazartesi günü %40, pazartesi indirim yok.
senaryo:
müşteri mağazaya giriyor. ->Magaza shop = new Magaza();
sonra alışverişini yapıyor. ->shop.setUrun("Gomlek"); shop.setFiyat(100);
alışveriş yaptığı güne göre indirim uygulanıp fiyat düşecek.
son olarak işlemini bitirir. -> shop.odeme();