NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

1.Ders►

random ile ilgili quiz veya vize de soru çıkar
-asal sayıları
-tek olanları çift olanları bulun tarzında
-ör=48 ile 72 arasında random sayı üretme
-constructor örneği vize ve finalde kesin gelecek
-bir nesneyi parametre sinden oluşturun .....
-iki farklı nesnenin aynı özelliklerini tek seferde oluşturup çekmemize deniyor
-1. kural cons. ismi sınıf ismi ile aynı olacaktır
-public xtz (){ bu cons. dır
-kodlarımızı main de yazmamız gerekir
-2. kural parametreli veya parametre siz oluşturulur.




2.DERS►
-constructor il ilgili soru
vize ve quiz de çıkabilecek benzerlikte


sınıfımın ismi "insan" özellikleri = boy, yaş, cinsiyet, kilo
bu özellikler public olacaktır
(belirtilirse private de olabilir)
iki cons. oluşuturacak
1 tanesi tüm özelliklere parametre göndericek
Diğeri hiç birini parmetre olarak göndermeyecek
1 fonk. (goster)
tüm özellikleri ekranda göstericek
bu sınıfa ait 4 adet nesne oluşturulacak

public int boy
public int yas
public int kilo
public string cinsiyet


class insan {int boy, int yas, int kilo, string cinsiyet;}

this.boy=boy
this.yas.=yas
this.kilo=kilo
this.cinsiyet=cinsiyet

----------------

class insan {
int boy;
int yas;
int kilo;
string cinsiyet;
public insan (){

boy = 180;
yas= 15;
kilo= 50;
cinsiyet= Erkek;

}
public insan ( int boy, int yas, int kilo, string cinsiyet )
{
this.boy = boy;
this.yas.=yas;
this.kilo=kilo;
this.cinsiyet=cinsiyet;
}
}
class deneme{
public static void main(String args[]){
insan ali = new insan();
insan hanoko= new insan();
insan maho= new insan();
insan alex= new insan();
insan ali= new insan ( 170,15,50,Erkek);
insan hanoko= new insan ( 195,25,100,Erkek);
insan maho= new insan ( 177,22,60,Kadin);
insan alex= new insan ( 185,19,75,Erkek);
}
}


DOĞRU CEVAP =▼
-
--
---

public class insan{
int boy;
int yas;
string cinsiyet;
int kilo;
public insan(int a, int b,string c,int d{
boy =a;
yas =b;
cinsiyet =c;
kilo =d;
}
public insan(){
}
public void göster(){
syso("boy =" + boy);
syso("yas=" + yas);
syso("cinsiyet=" + cinsiyet);
syso("kilo=" + kilo);


}


public static void main(String [] args){
insan i1= new insan(72,12,"kız",65);
i1.goster();
insan i2= new insan(55,13,"erkek",15);
i2.goster();
insan i3= new insan(58,26,"kız",12);
i3.goster();
insan i4= new insan(65,38,"erkek",21);
i4.goster();

---
--
-

3.Ders►
KALITIM
yine iki sınıfımız var
araba ve otomobil sınıf var
ikisinin ortak özellikleri var
ortak özellikleri üst sınıftan alıyorum

örnek=
public class Boyut {
double en, boy;
void göster(){
syso("en ve boy değerleri :" +en+boy);
}}

class Sekil extends Boyut{
String stil;

double alan(){
return en *boy/2;
}

void seklimiz(){
syso("sekil:"+ stil);
}
public static void main (String[] args){
Sekil t1= new Sekil();
Sekil t2= new Sekil();

t1.en=4.0;
t1.boy=4.0;
t1.stil="kare dir";


t2.en=8.0;
t2.boy=12.0;
t2.stil="dikdortgen dir";

syso("t1 özellikjleri:");
t1.seklimiz();
t1.goster();
syso("Alan:"+t1.alan());
syso();
syso("t2 özellikjleri:");
t1.seklimiz();
t1.goster();
syso("Alan:"+t2.alan());
syso();
}}
















ders dışı ascii note=
◄=785
┘=985





     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.