Ppt

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ppt as PDF for free.

More details

  • Words: 156
  • Pages: 1
system <--- n�vt�r public class {}

(namespace) program is oszt�ly

public -- mindenonnan el lehet �rni (vagy nincs oda�rva semmi) protected -- csak az oszt�ly p�ld�nya f�r hozz� private -- bmw p�ld�nyban z3 v�ltoz� static -- nem kell p�ld�nyos�tani. (amiben van this az m�r nem lehet static) void -- nincs visszat�r�si �rt�ke public static int �sszead�s(int a, int b) -- intet ad vissza ref int a, ref int b public class auto { int v�gseb=230; string m�rka="bmw"; protected bool abs=true; public auto() {} -- konstruktor public auto(int vegs�) {v�gseb=vegs�; m�rka="bmw"; abs=true; } mindent!! ... public void tuning() {this.v�gseb=this.v�gseb+10;} public bool absvane() {return this.abs;}

--public-al

main-be: auto mycar = new auto(); auto tuningbmw = new auto(300); tuningbmw.tuning(); tuningbmw.v�gseb=--- -10; csak ha public a v�gseb console.writeline("{0}",tuningbmw.absvane.tostring()); --kell lennie valaminek a r�sz�nek diesel mydieselcar = new diesel; mydieselcar.tuning(); �r�kl�s: aut�b�l diesel public class diesel:auto { public diesel(int vegs�) {v�gseb=vegs�; m�rka="bmw"; abs=true; } }

--minden bennevan ami az aut�ban volt

Related Documents

Ppt
November 2019 88
Ppt
December 2019 96
Ppt
November 2019 82
Ppt
October 2019 87
Ppt
June 2020 22
Ppt
June 2020 25