Review day3 Flashcards
Control System
A control system is a device that manages the behavior of other devices or systems.
Four functions of a control system
- Measurement
- Comparison
- Computation
- Correction
Three important hardware
- Sensor
- Controller
- Control Element
Microprocessor
A microprocessor is a integrated circuit that contains an entire CPU in one chip.
Sensor
A sensor is a device that measures a physical quantity and responds to it.
Actuator
A device that turns electrical energy and signals into mechanical motion. Used in control systems as output.
Transducer
A device that changes energy from one form to another. (sensor or actuator)
Centralized system
All the computation and processing are done by the central computer.
Distributed system
Different components are control by different processing unit located through the network.
Centralized system(Cons)
lower performance
less reliable
cost more
distributed system(Pros)
scalable
more reliable
cost less
Distributed system(cons)
security
hard to manage
Autonomous Agents
Autonomous agents are programs that perform operations with some degree of independence.
4 feature of Autonomous Agents
Autonomy, Reactive Behavior, Sociality, Persistence
Autonomy
The agents should choose what to do themselves instead of being invoked or called upon to do things.
Reactive Behavior
Senses environmental and reacts base on this input.
Sociality
Can react with other agents cooperatively
Persistent
An agent consistently acts in pursuit of its goal
initialize Array
int[] numbers = {1, 2, 3, 4, 5};
String[] names = {“Alice”, “Bob”, “Charlie”};
Initialize ArrayList
ArrayList<String> list = new ArrayList<>();</String>
Initialize LinkedList
LinkedList<String> list1 = new LinkedList<>();</String>
add element in LinkedList
list.add(“Apple”);
remove element in LinkedList
list.remove(); //or list.remove(index);
Initialize stack
Stack<String> stringStack = new Stack<>();</String>
add element to a stack
myStack.push(10);
remove element from a stack
stack.pop();
Initialize an queue
Queue<Integer> queue = new LinkedList<>();</Integer>
add element to queue
queue.offer(30); // or add()
remove element from queue
queue.poll(); //remove()
return the head of the queue, but do not remove
peek()