Hirdetés
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- sziku69: Szólánc.
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- Vandit.: Milyen zenét hallgattok most?
- gban: Ingyen kellene, de tegnapra
- f(x)=exp(x): A laposföld elmebaj: Vissza a jövőbe!
- Depression: R.I.P.
- Luck Dragon: Óraátállítás
- hcl: GPT diszk kisebbre klónozása
Új hozzászólás Aktív témák
-
Azazello-
senior tag
idaig sikerult eljutnom _asszem_ jol:
concert:
/**
* Write a description of class Concert here.
*
*
*/
public class Concert
{
private int year;
private String location;
private boolean ticketsLeft;
//Fieldspublic Concert(int y, String l,boolean t){
year=y;
location=l;
ticketsLeft=t;
}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 y){
year =y;
}
public void setLocation(String s){
location = s;
}
public void setTicketsLeft(boolean b){
ticketsLeft = b;
}public void printConcert(){
System.out.println("Location: "+location);
System.out.println("Year :"+year);
System.out.println("Tickets Left: "+ticketsLeft);
}}
CD:
/**
* A class that maintains information on a CD.
*
*
*/public class CD
{
// The fields.
private Artist performer;private String album;
private String genre;
private int numberOfTracks;
private int yearReleased;/*
*Create two constructors - one to take arguments for all fields - one that takes none.
*/
public CD (String a, String g, int tr, int y){album=a;
genre=g;
numberOfTracks=tr;
yearReleased=y;
}public CD(){
album="";
genre="";
numberOfTracks=0;
yearReleased=0;}
//accessor methods
public String getAlbum(){
return album;
}public String getGenre(){
return genre;
}public int getTracks(){
return numberOfTracks;
}public int getYear(){
return yearReleased;
}// mutator methods
public void getAlbum(String a){
album = a;
}public void getgenre(String g){
genre = g;
}public void getTracks(int tr){
numberOfTracks=tr;
}public void getYear(int y){
yearReleased=y;
}//print the details of the CD to the console
public void printCD(){
System.out.println("Album Title "+album);
System.out.println("Album Genre "+genre);
System.out.println("Number of Tracks "+numberOfTracks);
System.out.println("Year Relased "+yearReleased);
}
}Artist:
/**
* Write a description of class Artist here.
**/
public class Artist
{
// instance variables
private String firstname;
private String lastname;
private int age;
private Concert nextConcert;/**
* Constructor(s) for objects of class Artist
*/public Artist (String fName, String lName, int artistAge, Concert nextConcert){
firstname=fName;
lastname=lName;
age=artistAge;
nextConcert = new Concert();
}public Artist(){
firstname="";
lastname="";
age=0;
nextConcert = new Concert();
}/**
* accessor methods
*/
public String getName(){
return firstname;
}public String getlName(){
return lastname;
}public int getAge(){
return age;
}/**
* mutator methods
*/
public void printArtist(){
nextConcert.printConcert();}
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Új Dobozos Dell Latitude 3450 Laptop 14" -40% i7-1355U 16GB/256GB SSD NVIDIA MX570A 2GB FHD
- Megkímélt HP EliteBook 855 G7 Fémházas Strapabíró Laptop 15,6" -65% AMD Ryzen 3 PRO 4450U 16/256 FHD
- DDR5 Gamer PC - i5 14400f, RTX 3070 Ti, 1 TB SSD, Z 790-S Wifi
- Ryzen esportpc(ryzen3 -4100/RX580-8gb/SSD/hdd)
- Prémium! Gamer PC-Számítógép! Csere-Beszámítás! Rog C VIII / R9 3950X / RTX 3080 / 1TB SSD / 32GB
- Windows, Office licencek kedvező áron, egyenesen a Microsoft-tól - Automata kézbesítés utalással is!
- 27% Számlával! ASUS ROG Loki 1000W 80 PLUS Platinum Tápegység!
- 27% - LG UltraGear 27GS75Q-B Monitor! 2560x1440 / 200Hz / 1ms / G-Sync / G-Sync / FreeSync
- Eladó Apple iPhone 12 Mini 64GB fehér / 12 hónap jótállás
- CÉGEK FIGYELEM!! iPhone 11 64GB Black -1 ÉV GARANCIA - 27% ÁFA-S SZÁMLA Kártyafüggetlen, 100% Akksi
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
