Hirdetés
- sziku69: Szólánc.
- sziku69: Fűzzük össze a szavakat :)
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Luck Dragon: Asszociációs játék. :)
- eBay-es kütyük kis pénzért
- joghurt: Megtarthatod a jogsid?
- Klaus Duran: Panelkérdés.
- Syl: UPS - te áldott!
- Tóth Olivér: Kedvenc processzorok:
- eldiablo: 30 év után szakítottunk, de azért még beszélünk...
Új hozzászólás Aktív témák
-
Azazello-
senior tag
lehetseges e egy boolian validation es ha igen, akkor hogyan?
/**
* This is my Concert class it contains informations about year, location and are there any ticket left.
*
* @author ()
* @version (10/12/09)
*/
public class Concert
{
private int year;
private String location;
private boolean ticketsLeft;
//Fields
public Concert(int conYear, String lct,boolean ticketAv){
year=conYear;
//this next line of code will call the method that will validate the information that is has been imput by the user
setLocation(lct);
ticketsLeft=ticketAv;
}
public Concert(){
year=0;
location="";
ticketsLeft=false;
}
//accessors
public int getYear(){
return year;
}
public String getLocation(){
return location;
}
public boolean getTicketsLeft(){
return ticketsLeft;
}
//mutators
public void setYear(int conYear){
year =conYear;
}
public void setLocation(String lct){
// the next line of code validates that the user has typed in "brighton Hastings or London"
if(lct.equals ("Brighton") || lct.equals("Hastings") || lct.equals("London")){
location = lct;
}
else{
//the next line of code print out a message when "Brighton Hastings or London" hasn't been typed
System.out.println("Valid locations: Brighton, Hastings, London");
}
}
public void setTicketsLeft(boolean ticketAv){
ticketsLeft = ticketAv;
}
//the next method will print out the Concert details
public void printConcert(){
System.out.println("Location: "+location);
System.out.println("Year :"+year);
System.out.println("Tickets Left: "+ticketsLeft);
}
}
Új hozzászólás Aktív témák
Hirdetés
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Milyen autót vegyek?
- Bluetooth hangszórók
- sziku69: Szólánc.
- Milyen monitort vegyek?
- sziku69: Fűzzük össze a szavakat :)
- alza vélemények - tapasztalatok
- Spórolós topik
- Flip (IPTV, otthoni internet, vezetékes telefon)
- Friss alaplapszériát avat az ASRock
- NFL és amerikai futball topik - Spoiler veszély!
- További aktív témák...
- Samsung Galaxy Watch8 44mm, 1 Év Garanciával
- Creative Sound BlasterX G6 fejhallgató erősítő (DAC)
- CSERE IS! BONTATLAN 3 év garancia Honor 400 Lite 8/256 Velvet Black
- Asus Tuf Gaming A15 Ryzen 7 7735HS 16Gb ram 1TB SSD RTX 4060 6 hó garancia!
- HP Victus 16 Core i7 13700H 16Gb ram 1TB SSD RTX 4070 6 hó garancia!
- Bomba ár! HP ProBook 430 G5 - i5-8GEN I 8GB I 128SSD I HDMI I 13,3" FHD I Cam I W11 I Garancia!
- MacBook Pro 16" M1 16GB RAM 27%-os áfás számla (0231)
- Bomba ár! Lenovo ThinkPad X240 - i5-4GEN I 8GB I 256SSD I 12,5" HD I W10 I Garancia!
- Bomba ár! Dynabook Portege X30-G - i5-10210U I 8GB I 256SSD I 13,3" FHD I Cam I W11 I Garancia!
- Telefon felvásárlás!! iPhone 13 Mini/iPhone 13/iPhone 13 Pro/iPhone 13 Pro Max
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest

