Arama butonu
Bu konudaki kullanıcılar: 2 misafir, 1 mobil kullanıcı
5
Cevap
364
Tıklama
0
Öne Çıkarma
Java Yardım
C
11 yıl (292 mesaj)
Teğmen
Konu Sahibi

Merhabalar,

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();

DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.

Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.

Üye Ol Şimdi Değil



B
10 yıl (9753 mesaj)
Yarbay

quote:

Orijinalden alıntı: duru801801


bunu yapabilecek birileri var mı acil lütfen

(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).

{1,2,3,4} › {2,2,6,4} //no need to digitsum

{3,5,7,2,2} › {3,1,7,4,2} //5*2=10 digitsum=1

{0,0,0,5,7,0} › {0,0,0,5,5,0} // 7*2 = 14 digitsum= 5

(c) After that sum all the numbers.

{2,2,6,4}› 2+2+6+4 =14

{3,1,7,4,2} › 3+1+7+4+2 = 17

{0,0,0,5,5,0} › 5+5 = 10

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

Example01:

“Hello” › Mask: 2

“Jgnnq”

Example02:

“cam” › Mask: 1

“dbn”


1. sorunun aynısını bugün biri daha sordu cevabını şu konuya yazdım. https://forum.donanimhaber.com/fb.asp?m=122796606

2. soruyu da çözerim şimdi

İkiniz de aynı okuldasınız sanırım hangi okul?



DH Mobil uygulaması ile devam edin. Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin. Gizle ve güncelleme çıkana kadar tekrar gösterme.