Java Packing Box Capacity
Java is a programming language used for writing software applications and websites. Java code can be used to simulate actual behavior. Black box testing is used for the functional testing of Java code without reviewing the code itself.
-
Packing Box Capacity
-
In the packing box capacity equation, the volume of each item is checked against the remaining space in a box to verify if there is space. The box capacity and item size are size variables in Java. Volume of each item is given or randomly assigned. Another item could be put in if its volume is less than or equal to the remaining packing box capacity.
Code of Packing Box Calculation
-
The Java code stops when the box is full and space left is zero. The verification of space left in the packing box is a Boolean expression. "Fundamentals of Computer Science Using Java" by David Hughes says "This comparison is done by the ALU (arithmetic logic unit)." If the comparison is false, the code stops and states the box is full. If the comparison value is true, the object goes in. The remaining space in the packing box is the prior volume minus the size of the recently added object. The volume of the next item is checked against the space available.
-
Black Box Code Testing
-
Black box testing evaluates the functionality of the software code. Java code is tested as if stored in a black box, its behavior unknown except for its responses. According to "Top Productivity through Software Reuse" by Klaus Schmid, "The primary way of black-box reuse in Java programs is the inclusion of libraries." Website testing by general users without access to the Java code is another form of black box testing.
-
References
- "Top Productivity through Software Reuse"; Klaus Schmid; 2011
- "Fundamentals of Computer Science using Java"; David Hughes; 2002
- "Unit Testing in Java"; Johannes Link, Peter Fröhlich; 2003
- "Java Connector Architecture"; Atul Apte; 2002
- "Java Programming"; Gary Shelly, Thomas Cashman, Michael Mick, Joy Starks; 2005
- Photo Credit Brand X Pictures/Brand X Pictures/Getty Images Jupiterimages/Comstock/Getty Images