<repo_name>karenalo13/SeminarCts<file_sep>/state/src/ro/ase/cts/v2Componente/Libera.java
package ro.ase.cts.v2Componente;

public class Libera implements Stare{

	@Override
	public void afisareDescriere() {
		System.out.println("suntem in stare libera");
	}

}
<file_sep>/state/src/ro/ase/cts/componente/Libera.java
package ro.ase.cts.componente;

public class Libera implements StareMasa {

	@Override
	public void modificaStare(Masa masa) {
		if(!(masa.getStareMasa() instanceof Libera ))
		{
			System.out.println("Masa cu nr "+masa.getNume()+" a fost eliberata");
			masa.setStareMasa(this);
			
		}
		else
		{
			System.out.println("Masa este deja libera");
		}
		
	}

}
<file_sep>/flyweight/src/ro/ase/cts/componente/FlyweightAbstract.java
package ro.ase.cts.componente;

public interface FlyweightAbstract {
	
	void afisareInformatii(Rezervare rezervare);
}
<file_sep>/composite/src/ro/ase/cts/main/main.java
package ro.ase.cts.main;

import ro.ase.cts.componente.Element;
import ro.ase.cts.componente.IOptiuneMeniu;
import ro.ase.cts.componente.Sectiune;

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		IOptiuneMeniu meniu = new Sectiune("Meniu restaurant");
		IOptiuneMeniu optiune1 = new Sectiune("Bauturi");
		IOptiuneMeniu optiune2 = new Sectiune("Desert");
		
		IOptiuneMeniu item1 = new Element("Frappe");
		IOptiuneMeniu item2 = new Element("Apa plata");
		IOptiuneMeniu item3 = new Element("Papanasi");
		try {
			optiune1.adaugaNod(item1);
			optiune1.adaugaNod(item2);
			
			optiune2.adaugaNod(item3);
			
			meniu.adaugaNod(optiune1);
			meniu.adaugaNod(optiune2);
			
			meniu.descriere();
			
			optiune1.stergeNod(item1);
			optiune2.adaugaNod(item1);
			
			meniu.descriere();
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}

}
<file_sep>/seminar_single_factory/src/ro/ase/cts/componente/CategoriiMedicamente.java
package ro.ase.cts.componente;

public enum CategoriiMedicamente {
	raceala,
	durere,
	body

}
<file_sep>/builder/src/ro/ase/cts/componenteV1/Builder.java
package ro.ase.cts.componenteV1;

public interface Builder {
		Rezervare build();
}
<file_sep>/command/src/ro/ase/cts/componente/Retragere.java
package ro.ase.cts.componente;

public class Retragere extends Command{

	public Retragere(ContBancar cont,int suma) {
		super(cont,suma);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void executa() {
		super.getCont().retragere(super.getSuma());
		
	}

}
<file_sep>/state/src/ro/ase/cts/componente/Ocupata.java
package ro.ase.cts.componente;

public class Ocupata implements StareMasa {

	@Override
	public void modificaStare(Masa masa) {
		if(!(masa.getStareMasa() instanceof Ocupata))
		{
			masa.setStareMasa(this);
			System.out.println("Masa cu numarul "+masa.getNume()+  " s-a ocupat");
		}
		else
		{
			System.out.println("Masa este ocupata");
		}
		
	}

}
<file_sep>/command/src/ro/ase/cts/componente/Constituire.java
package ro.ase.cts.componente;

public class Constituire extends Command {

	public Constituire(ContBancar cont, int suma) {
		super(cont,suma);
		// TODO Auto-generated constructor stub
	}
	
	

	@Override
	public void executa() {
		super.getCont().constituire(super.getSuma());
		
	}

}
<file_sep>/penultimul_seminar/src/penultimul_seminar/grupa/TestCaseGetPromovabilitate.java
package penultimul_seminar.grupa;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import penultimul_seminar.clase.Grupa;
import penultimul_seminar.clase.IStudent;

public class TestCaseGetPromovabilitate {
	private IStudent studentStub= new StudentStub();

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		Grupa grupa = new Grupa(1010);
		grupa.adaugaStudent(studentStub);
		
		assertEquals(1,grupa.getPromovabilitate(), 0.01f);
	}
}
<file_sep>/seminar2/src/ro/ase/cts/main/Main.java
package ro.ase.cts.main;

import java.io.FileNotFoundException;
import java.util.List;

import ro.ase.cts.clase.Angajat;
import ro.ase.cts.clase.Aplicant;
import ro.ase.cts.clase.Proiect;
import ro.ase.cts.clase.Student;
import ro.ase.cts.readers.AplicantReader;
import ro.ase.cts.readers.ReadAngajati;
import ro.ase.cts.readers.ReadStudents;

public class Main {

		public static List<Aplicant> citesteAplicanti(AplicantReader reader) throws NumberFormatException, FileNotFoundException{
			return reader.citesteAplicanti();
			
			
			
		}
	
	
		public static void main(String[] args) {
			List<Aplicant> listaAplicanti;
			try {
				listaAplicanti =citesteAplicanti(new ReadStudents("studenti.txt"));
				for(Aplicant angajat:listaAplicanti) {
					System.out.println(angajat.toString());
					angajat.afiseazaStatus(new Proiect(80));
				}
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			System.out.print(Angajat.getSmaFinantare());
			System.out.print(Student.getSmaFinantare());
		}
		
	

}
<file_sep>/builder/src/ro/ase/cts/main/MainV2.java
package ro.ase.cts.main;

import ro.ase.cts.componenteV2.Rezervare;
import ro.ase.cts.componenteV2.RezervareBuilder;

public class MainV2 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		RezervareBuilder builder=new RezervareBuilder();
		builder.setBautura(true);
		builder.setCod(2);
		
		Rezervare rezervare1=builder.build();
		
		
		builder.setBautura(false).setCod(5).setMancare(true);
		
		
		Rezervare rezervare2=builder.build();
		System.out.println(rezervare1.toString());
		System.out.println(rezervare2.toString());
	}

}
<file_sep>/Template/src/ro/ase/cts/componente/SpectatorPeluza.java
package ro.ase.cts.componente;

public class SpectatorPeluza extends SpectatorAbstract{

	@Override
	public void asezareLaCoada() {
		System.out.println("spectatorul de peluza s-a asezat la coada");
	}

	@Override
	public void prezintaBilet() {
		System.out.println("spectatorul de peluza a prezentat biletul");
	}

	

	@Override
	public void intrarePeStadion() {
		System.out.println("spectatorul a intrat in peluza");
	}

	@Override
	public void ocupareLoc() {
		System.out.println("spectatorul de peluza a ocupat un loc");		
	}

	@Override
	public void realizareControlCorporal() {
		System.out.println("spectatorul de peluza a fost controlat");
	}
}

<file_sep>/Decorator/src/ro/ase/cts/componente/ICard.java
package ro.ase.cts.componente;

public interface ICard {
void platesteFizic();
void platesteOnline();
String getDetinatorCard() ;
}
<file_sep>/observer/src/ro/ase/cts/componente/Observer.java
package ro.ase.cts.componente;

public interface Observer {
	public void receptionareMesaj(String mesaj);
}
<file_sep>/prototype/src/ro/ase/cts/componente/Bilet.java
package ro.ase.cts.componente;

public class Bilet implements AbstractPrototype{

	private int cod;
	private String echipa1;
	private String echipa2;
	private String data;
	
	
	
	
	public Bilet(int cod, String echipa1, String echipa2, String data) {
		super();
		this.cod = cod;
		this.echipa1 = echipa1;
		this.echipa2 = echipa2;
		this.data = data;
	}
	
	
	
	private Bilet() {
		super();
	}



	public int getCod() {
		return cod;
	}
	public void setCod(int cod) {
		this.cod = cod;
	}
	@Override
	public String toString() {
		return "Bilet [cod=" + cod + ", echipa1=" + echipa1 + ", echipa2=" + echipa2 + ", data=" + data + "]";
	}
	@Override
	public AbstractPrototype copiaza() {
		// TODO Auto-generated method stub
		Bilet copie=new Bilet();
		copie.cod=this.cod;
		copie.data=this.data;
		copie.echipa1=this.echipa1;
		copie.echipa2=this.echipa2;
		return copie;
	}
	
	
	
	
}
<file_sep>/penultimul_seminar/src/penultimul_seminar/suite/SuitaCompleta.java
package penultimul_seminar.suite;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import penultimul_seminar.grupa.GrupaTest;
import penultimul_seminar.grupa.GrupaTestSetUp;
import penultimul_seminar.grupa.GrupaWithFakeTest;
import penultimul_seminar.grupa.TestCaseDummy;
import penultimul_seminar.grupa.TestCaseGetPromovabilitate;


@RunWith(Suite.class)
@SuiteClasses({GrupaTest.class, GrupaTestSetUp.class, GrupaWithFakeTest.class,
	TestCaseGetPromovabilitate.class, TestCaseDummy.class})
public class SuitaCompleta {
	
}<file_sep>/adapterClase/src/ro/ase/cts/componente/Leasing.java
package ro.ase.cts.componente;

public class Leasing {
	
	public void OferaLeasing(String nume, Float suma) {
		System.out.println("Clientul "+nume+" a primit suma de "+suma);
	}

}
<file_sep>/prototype/src/ro/ase/cts/componente/AbstractPrototype.java
package ro.ase.cts.componente;

public interface AbstractPrototype {

	AbstractPrototype copiaza();
	
}
<file_sep>/builder/src/ro/ase/cts/main/MainInner.java
package ro.ase.cts.main;

import ro.ase.cts.inner.Rezervare;

public class MainInner {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
//		Rezervare rez1=Rezervare.builder();
	}

}
<file_sep>/state/src/ro/ase/cts/componente/Rezervata.java
package ro.ase.cts.componente;

public class Rezervata implements StareMasa{

	@Override
	public void modificaStare(Masa masa) {
		if( masa.getStareMasa() instanceof Libera) {
			System.out.println("Masa a fost rezervata " +masa.getNume());
			masa.setStareMasa(new Rezervata());
		}
		else {
			System.out.println("Actiune imposibil de realizat");
		}
		
	}

}
<file_sep>/seminar_single_factory/src/ro/acs/cts/method_factory/FactoryRaceala.java
package ro.acs.cts.method_factory;

public class FactoryRaceala implements FactoryCategorie{

	@Override
	public Categorie createCategorie(float pret) {
		// TODO Auto-generated method stub
		return new Raceala(pret);
	}

}
<file_sep>/state/src/ro/ase/cts/componente/StareMasa.java
package ro.ase.cts.componente;

public interface StareMasa {
	void modificaStare(Masa masa);
}
<file_sep>/Decorator/src/ro/ase/cts/componente/AbstractDecorator.java
package ro.ase.cts.componente;

public abstract  class AbstractDecorator implements ICard{
	private ICard iCard;

	public AbstractDecorator(ICard iCard) {
		super();
		this.iCard = iCard;
	}

	@Override
	public void platesteFizic() {
		this.iCard.platesteFizic();
		
	}

	@Override
	public void platesteOnline() {
		this.iCard.platesteOnline();
		
	}
	
	public abstract void platesteContactless();

	@Override
	public String getDetinatorCard() {
		return iCard.getDetinatorCard();
	}

	public ICard getiCard() {
		return iCard;
	}

	public void setiCard(ICard iCard) {
		this.iCard = iCard;
	}
	
	
	
	
}
<file_sep>/builder/src/ro/ase/cts/inner/Builder.java
package ro.ase.cts.inner;

public interface Builder {
	Rezervare build();
}
<file_sep>/Template/src/ro/ase/cts/main/Main.java
package ro.ase.cts.main;

import ro.ase.cts.componente.Spectator;
import ro.ase.cts.componente.SpectatorAbstract;
import ro.ase.cts.componente.SpectatorPeluza;

public class Main {

	public static void main(String[] args) {
		SpectatorAbstract spec=new Spectator();
		spec.intrareaSpectatoruluiPeStadion();
		
		SpectatorAbstract peluza=new SpectatorPeluza();
		peluza.intrareaSpectatoruluiPeStadion();
	}

}
<file_sep>/state/src/ro/ase/cts/v2Componente/Ocupata.java
package ro.ase.cts.v2Componente;

public class Ocupata implements Stare {

	@Override
	public void afisareDescriere() {
		System.out.println("suntem in stare ocupata");
	}

}
<file_sep>/facade/src/facade/ro/ase/cts/componente/Pat.java
package facade.ro.ase.cts.componente;

public class Pat {
	private int numar;
	private boolean liber;
	public Pat(int numar, boolean liber) {
		super();
		this.numar = numar;
		this.liber = liber;
	}
	public int getNumar() {
		return numar;
	}
	public boolean isLiber() {
		return liber;
	}
	public void setLiber(boolean liber) {
		this.liber = liber;
	}
	
	
}
<file_sep>/seminar3/src/ro/ase/cts/main/main.java
package ro.ase.cts.main;

import ro.ase.cts.clase.cabinetVeterinar;
import ro.ase.cts.clase.cabinetVeterinarLazy;
import ro.ase.cts.exercitiu.Iad;

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
//		cabinetVeterinar clinica1= cabinetVeterinar.getInstance();
//		cabinetVeterinar clinica2= cabinetVeterinar.getInstance();
//		System.out.println(clinica1.toString());
//		System.out.println(clinica2.toString());
		
//		cabinetVeterinarLazy clinica1= cabinetVeterinarLazy.getInstance("ClinicaMea","<NAME>",4,4444.4f);
//		cabinetVeterinarLazy clinica2= cabinetVeterinarLazy.getInstance("ClinicaMea2","<NAME>",6,41444.4f);
//		clinica1.setAdresa("Bucuresti");
//		clinica2.setBuget(6000.66f);
//		
//		System.out.println(clinica1.toString());
//		System.out.println(clinica2.toString());
		
		
		Iad primulLocInCarePoposim= Iad.getInstance("sus",3000,900.75f);
		Iad zonaFierbinte= Iad.getInstance("mai sus",2000,1755.65f);
		
		System.out.println(zonaFierbinte.toString());
		System.out.println(primulLocInCarePoposim.toString());
		
		primulLocInCarePoposim.setLocatie("In ceruri");
		zonaFierbinte.setTemperaturaMaxima(6666.66f);
		
		System.out.println(zonaFierbinte.toString());
		System.out.println(primulLocInCarePoposim.toString());
		
		
		
	}

}
<file_sep>/composite/src/ro/ase/cts/componente/Element.java
package ro.ase.cts.componente;

public class Element implements IOptiuneMeniu{
private String nume;
	
	public Element(String nume){
		this.nume=nume;
	}

	@Override
	public void stergeNod(IOptiuneMeniu optiune) throws Exception {
		throw new Exception("NU este implementata");
		
	}

	@Override
	public void adaugaNod(IOptiuneMeniu optiune) throws Exception {
		throw new Exception("NU este implementata");
		
	}

	@Override
	public IOptiuneMeniu getNod(int index) throws Exception {
		throw new Exception("NU este implementata");
	}

	@Override
	public void descriere() {
		System.out.println("   Item: " + nume);
		
	}
	
	
}
<file_sep>/adapterClase/src/ro/ase/cts/main/Main.java
package ro.ase.cts.main;

import ro.ase.cts.componente.AdapterClase;
import ro.ase.cts.componente.InterfataCredit;

public class Main {

	
	
	public static void OferaInfoCredit(InterfataCredit interfataCredit,String nume , Float suma) {
		
		
		interfataCredit.acordaCredit(nume, suma);
	}
	
	
	public static void main(String[] args) {
		
		AdapterClase adapter=new AdapterClase();
		OferaInfoCredit(adapter,"regele",100f);
	}

}
<file_sep>/builder/src/ro/ase/cts/main/MainV1.java
package ro.ase.cts.main;

import ro.ase.cts.componenteV1.Rezervare;
import ro.ase.cts.componenteV1.RezervareBuilder;

public class MainV1 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
			
	Rezervare rezervare1=new RezervareBuilder().setBautura(true).setCod(4).build();
	Rezervare rezervare2=new RezervareBuilder().setMancare(true).setCod(7).build();
	
	System.out.println(rezervare1.toString());
	System.out.println(rezervare2.toString());
	}

}
<file_sep>/command/src/ro/ase/cts/componente/ContBancar.java
package ro.ase.cts.componente;

public class ContBancar {

	
	private int sumaCont;
	private String detinator;
	
	
	public ContBancar(String detinator) {
		super();
		this.sumaCont = 0;
		this.detinator = detinator;
	}
	
	public void constituire(int sumaRetrasa) {
		sumaCont=sumaRetrasa;
		System.out.println(" Cont Constituit");
	}
	
	public void retragere(int sumaRetrasa) {
		if(sumaRetrasa> sumaCont) {System.out.println("Nu se poate retrage");
	}
		else {
			sumaCont=sumaCont-sumaRetrasa;
			System.out.println("Suma retrasa");
		}
	}
	
	public void depunere(int sumaDepusa) {
		sumaCont=sumaCont+sumaDepusa;
		System.out.println("Suma depusa");
	}
	
	
}
<file_sep>/builder/src/ro/ase/cts/componenteV2/RezervareBuilder.java
package ro.ase.cts.componenteV2;

import ro.ase.cts.componenteV2.Rezervare;

public class RezervareBuilder implements Builder {

	
	private boolean mancare;
	private boolean scaun;
	private boolean muzica;
	private boolean bautura;
	private String genMuzica;
	private int cod;
	
	public RezervareBuilder() {
		super();
		this.mancare = false;
		this.scaun = false;
		this.muzica = false;
		this.bautura = false;
		this.genMuzica = "clasica";
		this.cod = 1;
	}
	
	
	public RezervareBuilder(int cod) {
		super();
		this.mancare = false;
		this.scaun = false;
		this.muzica = false;
		this.bautura = false;
		this.genMuzica = "clasica";
		this.cod = cod;
	}
	
	



	public RezervareBuilder setMancare(boolean mancare) {
		this.mancare = mancare;
		return this;
	}








	public RezervareBuilder setScaun(boolean scaun) {
		this.scaun = scaun;
		return this;
	}


 



	public RezervareBuilder setMuzica(boolean muzica) {
		this.muzica = muzica;
		return this;
	}


 

	public RezervareBuilder setBautura(boolean bautura) {
		this.bautura = bautura;
		return this;
	}

 



	public RezervareBuilder setGenMuzica(String genMuzica) {
		this.genMuzica = genMuzica;
		return this;
	}

 


	public RezervareBuilder setCod(int cod) {
		this.cod = cod;
		return this;
	}




	@Override
	public Rezervare build() {
		// TODO Auto-generated method stub
		return new Rezervare(mancare,scaun,muzica,bautura,genMuzica,cod);
		
	}

}
<file_sep>/command/src/ro/ase/cts/componente/Depunere.java
package ro.ase.cts.componente;

public class Depunere extends Command{

	public Depunere(ContBancar cont,int suma) {
		super(cont,suma);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void executa() {
		super.getCont().depunere(super.getSuma());		
	}

}
<file_sep>/penultimul_seminar/src/penultimul_seminar/grupa/SuitaCustom.java
package penultimul_seminar.grupa;

import org.junit.experimental.categories.Category;
import org.junit.experimental.categories.Categories;
import org.junit.experimental.categories.Categories.ExcludeCategory;
import org.junit.experimental.categories.Categories.IncludeCategory;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import penultimul_seminar.suite.categorii.TesteGetPromovabilitate;
import penultimul_seminar.suite.categorii.TesteNormale;



@RunWith(Categories.class)
@SuiteClasses({ GrupaTest.class, GrupaTestSetUp.class, GrupaWithFakeTest.class, TestCaseDummy.class,
		TestCaseGetPromovabilitate.class })
@IncludeCategory({TesteGetPromovabilitate.class})
@ExcludeCategory({TesteNormale.class})
public class SuitaCustom {
	
}<file_sep>/state/src/ro/ase/cts/v2Main/Main.java
package ro.ase.cts.v2Main;

import ro.ase.cts.v2Componente.Masa;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Masa masa=new Masa(1);
		masa.rezervaMasa();
		masa.rezervaMasa();
		masa.ocupaMasa();
		masa.elibereazaMasa();

	}

}
<file_sep>/seminar1/src/package_clase/Zebra.java
package package_clase;

public class Zebra extends Animal{

	private int numar_dungi;
	
	public Zebra(String nume, float greutate) {
		super(nume, greutate);
		// TODO Auto-generated constructor stub
	}

	public Zebra(String nume, float greutate, int numar_dungi) {
		super(nume, greutate);
		this.numar_dungi = numar_dungi;
	}

	public int getNumar_dungi() {
		return numar_dungi;
	}

	public void setNumar_dungi(int numar_dungi) {
		this.numar_dungi = numar_dungi;
	}
	

}
<file_sep>/SeminarTestare1/src/test/StudentTest.java
package test;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import pachet.Student;

public class StudentTest {
	
	@Before
	public void setUp() throws Exception {
	
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testConstructorNumeCorect() {
		String nume="Vasile";
		Student stud=new Student(nume);
		assertEquals(nume,stud.getNume());
	}
	
	@Test
	public void testVerificareAddNota() {
		Student student=new Student();
		int nota=8;
		student.adaugaNota(nota);
		assertEquals(nota,student.getNota(0));
	}
	
	@Test
	public void testDimensiuneListaCorecta() {
		Student student=new Student();
		int nota=8;
		student.adaugaNota(nota);
		assertEquals(1,student.getNote().size());
		
	}
	
	@Test
	public void testMedie() {
		Student student=new Student();
		int nota=8;
		student.adaugaNota(nota);
		assertEquals(8f,student.calculeazaMedie(),0.001f);
		
	}
	
	@Test
	public void testMedieMultipleNote() {
		Student student=new Student();
		int nota=8;
		int nota2=9;
		student.adaugaNota(nota);
		student.adaugaNota(nota2);
		assertEquals(8.5f,student.calculeazaMedie(),0.001f);
		
	}
	
	
	@Test
	public void testMedieFaraNote() {
		Student student=new Student();
		assertEquals(0f,student.calculeazaMedie(),0.001f);
		
	}
	
	@Test (expected=IndexOutOfBoundsException.class)
	public void testVerificaGetNota() {
		Student student=new Student();
		int nota=8;
		int nota2=9;
		student.adaugaNota(nota);
		student.adaugaNota(nota2);
		assertEquals(nota,student.getNota(-1)) ;
		
	}
	
	
	
	@Test 
	public void testVerificaGetNotaJU3() {
		Student student=new Student();
		int nota=8;
		
		student.adaugaNota(nota);
		
		try { int s=student.getNota(-1) ;
		fail("Aici nu trebuie sa ajungem");}
			catch(IndexOutOfBoundsException eroare) {
				
			}
		
		
	}
	
	@Test
	public void testVerificaRestanta() {
		Student student=new Student();
		int nota1=8;
		int nota2=3;
		int nota3=8;
		student.adaugaNota(nota1);
		student.adaugaNota(nota2);
		student.adaugaNota(nota3);
		
		assertTrue(student.areRestante()) ;
	}
	
	
	@Test
	public void testVerificaRestantaFalse() {
		Student student=new Student();
		int nota1=8;
		int nota2=6;
		int nota3=8;
		student.adaugaNota(nota1);
		student.adaugaNota(nota2);
		student.adaugaNota(nota3);
		
		assertFalse(student.areRestante()) ;
	}
	
	
	
	

}
<file_sep>/strategy/src/ro/ase/cts/componente/Cash.java
package ro.ase.cts.componente;

public class Cash implements ModPlata {

	@Override
	public void plateste(double sumaPlatita) {
		System.out.println("suma "+ sumaPlatita+" a fost platita cash" );
	}

}
<file_sep>/seminar_single_factory/src/ro/acs/cts/main/main_factoryMethod.java
package ro.acs.cts.main;

import ro.acs.cts.method_factory.FactoryCategorie;
import ro.acs.cts.method_factory.FactoryDurere;
import ro.acs.cts.method_factory.FactoryGripa;
import ro.acs.cts.method_factory.Categorie;
import ro.acs.cts.method_factory.FactoryBody;

public class main_factoryMethod {

	public static FactoryCategorie getTipFactory() {
		return new FactoryGripa();
	}
	
	public static void printeazaCategorie(FactoryCategorie factoryCategorie,float pret) {
		Categorie categorie=factoryCategorie.createCategorie(pret);
		System.out.println(categorie.toString());
	}
	
	public static void main(String[] args) {
		printeazaCategorie(getTipFactory(), 30);

	}

}
<file_sep>/adapter/src/ro/ase/cts/componente/InterfataCredit.java
package ro.ase.cts.componente;

public interface InterfataCredit {
	void acordaCredit(String numeClient, float suma);
}
<file_sep>/Decorator/src/ro/ase/cts/componente/Card.java
package ro.ase.cts.componente;

public class Card implements ICard {
  String detinatorCard;

public Card(String detinatorCard) {
	super();
	this.detinatorCard = detinatorCard;
}

@Override
public void platesteFizic() {
	System.out.println(this.detinatorCard+" a platit fizic");
	
}

@Override
public void platesteOnline() {
	// TODO Auto-generated method stub
	System.out.println(this.detinatorCard+" a platit online");
}

public String getDetinatorCard() {
	return detinatorCard;
}

public void setDetinatorCard(String detinatorCard) {
	this.detinatorCard = detinatorCard;
}
  
}
<file_sep>/state/src/ro/ase/cts/main/Main.java
package ro.ase.cts.main;

import ro.ase.cts.componente.Masa;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Masa masa=new Masa("1");
		masa.rezervareMasa();
		masa.rezervareMasa();
		masa.ocupaMasa();
		masa.eliberareMasa();

	}

}
