This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package tema2; | |
| public class Consumator extends Thread { | |
| int item; | |
| @Override | |
| public void run() { | |
| try { | |
| while(true) { | |
| Main.semFull.acquire(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package tema; | |
| import java.util.Queue; | |
| import java.util.LinkedList; | |
| public class Coada { | |
| public static Queue<Integer> coada = new LinkedList<Integer>(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package petriNet; | |
| public class Arc | |
| { | |
| private Locatie locatie; | |
| private int capacitate; | |
| private String directie; | |
| protected Arc(Locatie valueoflocatie, int valueofcapacitate, String valueofdirectie) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package tema4; | |
| import java.util.HashMap; | |
| public class CoffeeMachine extends StateMachine { | |
| CoffeeMachine (int starecurenta){ | |
| matrice = new HashMap<Integer, HashMap <Integer, Integer>>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package evaluator; | |
| public class CEvaluator { | |
| IGenerator generator; | |
| int nrPuncte; | |
| CEvaluator(IGenerator generator, int nrPuncte){ | |
| this.generator = generator; | |
| this.nrPuncte = nrPuncte; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package tema3; | |
| public class CBinomial | |
| { | |
| IGenerator generator; | |
| int n; | |
| float p; | |
| float rezultat1 = 0; | |
| float rezultat2 = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package generator; | |
| public class CLcg implements IGenerator { | |
| int x0 = 27; | |
| static int a = 17; | |
| static int c = 43; | |
| static int m = 100; | |
| @Override |