text stringlengths 3 1.18M |
|---|
//Source file: D:\\Users\\afpa\\Documents\\workspace\\20-otarie\\src\\fr.afpa.biblio.metier\\EmpruntEnCours.java
package fr.afpa.biblio.metier;
import java.util.Date;
public class EmpruntEnCours
{
private Date dateEmprunt;
private Utilisateur emprunteur;
private Exemplaire exemplaire;
/**
... |
//Source file: D:\\Users\\afpa\\Documents\\workspace\\20-otarie\\src\\fr.afpa.biblio.metier\\EmpruntArchive.java
package fr.afpa.biblio.metier;
import java.util.Date;
/**
* @author afpa
*
*/
/**
* @author afpa
*
*/
public class EmpruntArchive
{
private Date dateRestitutionEff;
private... |
/**
*
*/
package fr.afpa.biblio.metier;
/**
* @author pev
* Exception métier qui et lancée à chaque éxecption particulière du
* logiciel
*/
public class BiblioExeception extends Exception {
private static final long serialVersionUID = 6781744237292782745L;
/** LES CONSTRUCTEURS */
/**
... |
//Source file: D:\\Users\\afpa\\Documents\\workspace\\20-otarie\\src\\fr.afpa.biblio.metier\\Personne.java
package fr.afpa.biblio.metier;
import java.util.Date;
import fr.afpa.util.Utils;
/**
* @author pev
* @version 1.0
* Cette classe décrit les particularité d'une personne
*
*/
public class Pe... |
//Source file: D:\\Users\\afpa\\Documents\\workspace\\20-otarie\\src\\EnumCategorieEmploye.java
package fr.afpa.biblio.metier;
/**
* @author pev
* @version 1.6
* Contient les differents types d'employes de la bibliotheque.
*/
public enum EnumCategorieEmploye {
@SuppressWarnings("javadoc")
BIBLIOTHECA... |
package fr.afpa.util;
import javax.tools.JavaCompiler;
/**
* @author pev Cette classe contient des outil facilitant les tests
* @version 0.1
* @category Utils
*/
public class Utils {
/**
* Cette methode permet de remplacer une valeur null par un new du type concerne <br\>
* <blockquote><pre>... |
/**
*
*/
/**
* @author pev
* @version 0.1
* Un package contenant des méthodes utilitaire.
*
*/
package fr.afpa.util; |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.integer_assertions.integer_assertions;
/**
*
* @author guantong
*/
public interface IntegerAdd {
public int add(int a, int b);
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.integer_assertions.integer_assertions.integerImp;
import za.ac.cput.wo.integer_assertions.integer_assertions.IntegerAdd;
/**
*
* @author guantong
*/
public class IntegerImp implements I... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_null.assert_null.asser_nullImp;
import za.ac.cput.wo.assert_null.assert_null.AssertNull;
/**
*
* @author guantong
*/
public class AssertNullImp implements AssertNull{
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_null.assert_null;
/**
*
* @author guantong
*/
public interface AssertNull {
public Object getNull();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_null.config;
import org.springframework.context.annotation.Bean;
import za.ac.cput.wo.assert_null.assert_null.AssertNull;
import za.ac.cput.wo.assert_null.assert_null.asser_nullImp.A... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_not_same.config;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.ac.cput.wo.assert_not_same.assert_not... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_not_same.assert_not_same;
/**
*
* @author guantong
*/
public interface AssertNotSame {
public int getNumber();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_not_same.assert_not_same.notsameImp;
import za.ac.cput.wo.assert_not_same.assert_not_same.AssertNotSame;
/**
*
* @author guantong
*/
public class AssertNotSameImp implements ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_equal.assert_equal.config;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.ac.cput.wo.assert_equal.ass... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_equal.assert_equal.objectImp;
import za.ac.cput.wo.assert_equal.assert_equal.AssertEqual;
/**
*
* @author guantong
*/
public class AssertEqualImp implements AssertEqual {
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_equal.assert_equal;
/**
*
* @author guantong
*/
public interface AssertEqual {
public String getMessage();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_truth.config;
import org.springframework.context.annotation.Bean;
import za.ac.cput.wo.assert_truth.assert_truth.AssertTruth;
import za.ac.cput.wo.assert_truth.assert_truth.assert_tr... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_truth.assert_truth.assert_truthImp;
import za.ac.cput.wo.assert_truth.assert_truth.AssertTruth;
/**
*
* @author guantong
*/
public class AssertTruthImp implements AssertTruth... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_truth.assert_truth;
/**
*
* @author guantong
*/
public interface AssertTruth {
public int getActual();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_false.config;
import org.springframework.context.annotation.Bean;
import za.ac.cput.wo.assert_false.assert_false.AssertFalse;
import za.ac.cput.wo.assert_false.assert_false.falseImp.... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_false.assert_false;
/**
*
* @author guantong
*/
public interface AssertFalse {
public Boolean getFalse();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.assert_false.assert_false.falseImp;
import za.ac.cput.wo.assert_false.assert_false.AssertFalse;
/**
*
* @author guantong
*/
public class AssertFalseImp implements AssertFalse {
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.floating_point_assertions.floating_point_assertions.config;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.a... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.floating_point_assertions.floating_point_assertions.floatingImp;
import za.ac.cput.wo.floating_point_assertions.floating_point_assertions.Floating;
/**
*
* @author guantong
*/
publi... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo.floating_point_assertions.floating_point_assertions;
/**
*
* @author guantong
*/
public interface Floating {
public double add(double a, double b);
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package za.ac.cput.wo;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import za.ac.cput.wo.assert_array.test.AssertArrayJUnitTest;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.mediator;
/**
*
* @author Administrator
*/
public class ASale {
Mediator med;
double dollar;
public ASale(Mediator med, double dollar) {
this.med = med;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.mediator;
/**
*
* @author Administrator
*/
public class Mediator {
ASale aSale;
Buyer aBuy;
public Mediator() {
}
public void onlineASale( ASale aSale)... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.mediator;
/**
*
* @author Administrator
*/
public class ABuy extends Buyer{
public ABuy(Mediator med){
super(med);
this.med.onlineABuy(this);
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.mediator;
/**
*
* @author Administrator
*/
public class Buyer {
Mediator med;
public Buyer(Mediator med){
this.med=med;
}
public boolean ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.iterator;
/**
*
* @author Administrator
*/
public class Item {
String name;
float price;
public Item(String name, float price) {
this.name = name;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.iterator;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
*
* @author Administrator
*/
public class Menu {
List<Item> menuItems;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.chainResponsibility;
/**
*
* @author Administrator
*/
public class VenusHandler extends PlanetHandler {
public void handleRequest(PlanetEnum request) {
if (request ==... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.chainResponsibility;
/**
*
* @author Administrator
*/
public abstract class PlanetHandler {
PlanetHandler successor;
public void setSuccessor(PlanetHandler successor) {... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.chainResponsibility;
/**
*
* @author Administrator
*/
public class EarthHandler extends PlanetHandler {
public void handleRequest(PlanetEnum request) {
if (request ==... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.chainResponsibility;
/**
*
* @author Administrator
*/
public enum PlanetEnum {
MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE;
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.chainResponsibility;
/**
*
* @author Administrator
*/
public class MercuryHandler extends PlanetHandler{
public void handleRequest(PlanetEnum request ) {
if (request ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.composites;
/**
*
* @author Jameel
*/
public class Leaf implements Component {
String name;
public Leaf(String name) {
this.name = name;
}
@Overrid... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.composites;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Jameel
*/
public class Composite implements Component {
List<Component> components = new Arr... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.composites;
/**
*
* @author Jameel
*/
public interface Component {
public void sayHello();
public void sayGoodbye();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.command;
/**
*
* @author Administrator
*/
public class LunchCommand implements Command {
Lunch lunch;
public LunchCommand(Lunch lunch) {
this.lunch = lunch;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.command;
/**
*
* @author Administrator
*/
public class DinnerCommand implements Command {
Dinner dinner;
public DinnerCommand(Dinner dinner) {
this.dinner = di... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.command;
/**
*
* @author Administrator
*/
public interface Command {
public void execute();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.command;
/**
*
* @author Administrator
*/
public class Lunch {
public void makeLunch() {
System.out.println("Lunch is being made");
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.command;
/**
*
* @author Administrator
*/
public class Dinner {
public void makeDinner() {
System.out.println("Dinner is being made");
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.command;
/**
*
* @author Administrator
*/
public class MealInvoker {
Command command;
public MealInvoker(Command command) {
this.command = command;
}
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.flyWeight;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author Jameel
*/
public class FlyweightFactory {
private static FlyweightFactory flyweightFactory;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.flyWeight;
/**
*
* @author Jameel
*/
public class FlyweightMultiplier implements Flyweight{
String operation;
public FlyweightMultiplier() {
operation = "m... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.flyWeight;
/**
*
* @author Jameel
*/
public class FlyweightAdder implements Flyweight {
String operation;
public FlyweightAdder() {
operation = "adding";
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.flyWeight;
/**
*
* @author Jameel
*/
public interface Flyweight {
public void doMath(int a, int b);
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.decorator;
/**
*
* @author Administrator
*/
public interface Animal {
public void describe();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.decorator;
/**
*
* @author Administrator
*/
public abstract class AnimalDecorator implements Animal{
Animal an;
public AnimalDecorator(Animal an){
this.an = an;
}... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.decorator;
/**
*
* @author Administrator
*/
public class LivingAnimal implements Animal {
@Override
public void describe(){
System.err.println("\n I am alive");
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.decorator;
/**
*
* @author Administrator
*/
public class EyeDecorator extends AnimalDecorator{
public EyeDecorator(Animal an){
super(an);
}
@Override
public ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.memento;
/**
*
* @author Administrator
*/
public class DietInfo {
String personName;
int dayNumber;
int weight;
public DietInfo(String personName, int dayNumb... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.memento;
/**
*
* @author Administrator
*/
public class DietInfoCaretaker {
Object objMemento;
public void saveState(DietInfo dietInfo) {
objMemento = dietInfo.... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public class ReptileFactory extends SpeciesFactory {
@Override
public Animal getAnimal(String type) {
if("snake".equals(type)... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public class MammalFactory extends SpeciesFactory{
@Override
public Animal getAnimal(String type) {
if ("dog".equals(type)){... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public class Cat extends Animal {
@Override
public String makeSound() {
return "Meow";
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public abstract class Animal {
public abstract String makeSound ( ) ;
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public abstract class SpeciesFactory {
public abstract Animal getAnimal(String type) ;
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public class Tyrannosaurus extends Animal {
@Override
public String makeSound() {
return "Roar";
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public class AbstractFactory {
public SpeciesFactory getSpeciesFactory(String type) {
if ("mammal".equals(type)) {
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public class Dog extends Animal{
@Override
public String makeSound() {
return "Woof";
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.abstracts;
/**
*
* @author Jameel
*/
public class Snake extends Animal {
@Override
public String makeSound() {
return "Hiss";
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.strategy;
/**
*
* @author Administrator
*/
public class SkiStrategy implements Strategy {
@Override
public boolean checkTemperature(int temperatureInF) {
if (tem... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.strategy;
/**
*
* @author Administrator
*/
public class Context {
int temperatureInF;
Strategy strategy;
public Context(int temperatureInF, Strategy strategy) {
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.strategy;
/**
*
* @author Administrator
*/
public class HikeStrategy implements Strategy {
@Override
public boolean checkTemperature(int temperatureInF) {
if ((t... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.strategy;
/**
*
* @author Administrator
*/
public interface Strategy {
boolean checkTemperature ( int temperatureInF ) ;
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.proxy;
/**
*
* @author Jameel
*/
public class SlowThing extends Thing {
public SlowThing() {
try {
Thread.sleep(5000);
} catch (InterruptedExcep... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.proxy;
import java.util.Date;
/**
*
* @author Jameel
*/
public abstract class Thing {
public void sayHello(){
System.out.println(this.getClass().getSimpleName() + "s... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.proxy;
import java.util.Date;
/**
*
* @author Jameel
*/
public class Proxy {
SlowThing slowThing;
public Proxy() {
System.out.println("Creating proxy at " +... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.proxy;
/**
*
* @author Jameel
*/
public class FastThing extends Thing{
public FastThing(){
}
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.singleton;
import wo.cput.pattern.singleton.*;
import java.util.Date;
/**
*
* @author Jameel
*/
public class Singleton {
private static Singleton singleton = null;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.bridge;
/**
*
* @author Administrator
*/
public class SmallEngine implements Engine {
int horsepower;
public SmallEngine() {
horsepower = 150;
}
@O... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.bridge;
/**
*
* @author Jameel
*/
public interface Engine{
public int go();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.bridge;
/**
*
* @author Administrator
*/
public class SmallCar extends Vehicle {
public SmallCar(Engine engine) {
this.weightInKilos = 600;
this.engine = eng... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.bridge;
/**
*
* @author Administrator
*/
public class BigEngine implements Engine {
int horsepower;
public BigEngine() {
horsepower = 350;
}
@Overr... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.bridge;
/**
*
* @author Administrator
*/
public class BigBus extends Vehicle {
public BigBus(Engine engine) {
this.weightInKilos = 3000;
this.engine = engine... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.bridge;
/**
*
* @author Jameel
*/
public abstract class Vehicle {
Engine engine;
int weightInKilos;
public abstract void drive();
public void setEngine(Engi... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.bridge;
/**
*
* @author Administrator
*/
public class BigBus extends Vehicle {
public BigBus(Engine engine) {
this.weightInKilos = 3000;
this.engine = engine... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.visitor;
/**
*
* @author Administrator
*/
public class ThreeElement implements NumberElement {
int a;
int b;
int c;
public ThreeElement(int a, int b, int c) {... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.visitor;
/**
*
* @author Administrator
*/
public interface NumberElement {
public void accept(NumberVisitor visitor );
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.visitor;
import java.util.List;
/**
*
* @author Administrator
*/
public interface NumberVisitor {
public void visit(TwoElement twoElement);
public void visit(ThreeEl... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.visitor;
import java.util.List;
/**
*
* @author Administrator
*/
public class SumVisitor implements NumberVisitor{
@Override
public void visit(TwoElement twoElement) {... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.visitor;
import java.util.List;
/**
*
* @author Administrator
*/
public class TotalSumVisitor implements NumberVisitor{
int totalSum = 0;
@Override
public void ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.visitor;
/**
*
* @author Administrator
*/
public class TwoElement implements NumberElement {
int a;
int b;
public TwoElement(int a, int b) {
this.a = a;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.observer;
/**
*
* @author Administrator
*/
public class WeatherCustomer2 implements WeatherObserver {
@Override
public void doUpdate(int temperature) {
System.ou... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.observer;
/**
*
* @author Administrator
*/
public interface WeatherObserver {
public void doUpdate(int temperature);
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.observer;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/**
*
* @author Administrator
*/
public class WeatherStation implements WeatherSubject {
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.observer;
/**
*
* @author Administrator
*/
public interface WeatherSubject {
public void addObserver(WeatherObserver weatherObserver);
public void removeObserver(Weathe... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.observer;
/**
*
* @author Administrator
*/
public class WeatherCustomer1 implements WeatherObserver {
@Override
public void doUpdate(int temperature){
System.out.... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.builder;
/**
*
* @author Jameel
*/
public class JapaneseMealBuilder implements MealBuilder {
private Meal meal;
public JapaneseMealBuilder() {
meal = new Meal(... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.builder;
/**
*
* @author Jameel
*/
public class ItalianMealBuilder implements MealBuilder {
private Meal meal;
public ItalianMealBuilder() {
meal = new Mea... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.builder;
/**
*
* @author Jameel
*/
public interface MealBuilder {
public void buildDrink ();
public void buildMainCourse();
public void buildSide();
publi... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.builder;
/**
*
* @author Jameel
*/
public class MealDirector {
private MealBuilder mealBuilder = null;
public MealDirector(MealBuilder mealBuilder) {
this.meal... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.builder;
/**
*
* @author Jameel
*/
public class Meal {
private String drink;
private String mainCourse;
private String side;
public String getDrink() {
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package wo.cput.pattern.prototype;
/**
*
* @author Jameel
*/
public class Person implements Prototype{
String name;
public Person(String name){
this.name = name;
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.