Class TestMachine


  • public class TestMachine
    extends java.lang.Object
    Implements a test machine.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int lotSize  
      private double powerConsumption  
      private java.lang.String vendor  
    • Constructor Summary

      Constructors 
      Constructor Description
      TestMachine()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLotSize()
      Returns the actual lot size.
      double getPowerConsumption()
      Returns the power consumption.
      java.lang.String getVendor()
      Returns the vendor.
      boolean reconfigure​(int lotSize)
      Configures the lot size.
      void setLotSize​(int lotSize)
      Configures the lot size.
      void setVendor​(java.lang.String vendor)
      Changes the vendor.
      void start()
      Starts the machine.
      void stop()
      Stops the machine and resets the values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • lotSize

        private int lotSize
      • powerConsumption

        private double powerConsumption
      • vendor

        private java.lang.String vendor
    • Constructor Detail

      • TestMachine

        public TestMachine()
    • Method Detail

      • start

        public void start()
        Starts the machine.
      • stop

        public void stop()
        Stops the machine and resets the values.
      • getLotSize

        public int getLotSize()
        Returns the actual lot size.
        Returns:
        the lot size
      • setLotSize

        public void setLotSize​(int lotSize)
        Configures the lot size.
        Parameters:
        lotSize - the new lot size
      • reconfigure

        public boolean reconfigure​(int lotSize)
        Configures the lot size.
        Parameters:
        lotSize - the new lot size
        Returns:
        if the new lot size is greater than the old one
      • getPowerConsumption

        public double getPowerConsumption()
        Returns the power consumption.
        Returns:
        the power consumption
      • getVendor

        public java.lang.String getVendor()
        Returns the vendor.
        Returns:
        the vendor
      • setVendor

        public void setVendor​(java.lang.String vendor)
        Changes the vendor.
        Parameters:
        vendor - the new vendor