Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech QA/Testing 2 years ago
Posted on 16 Aug 2022, this text provides information on QA/Testing related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
What exactly is Subsystem testing">testing and is it any different from Integration Testing? Is subsystem testing">testing just testing">testing that the methods work when the parameters are passed to them?
What would be a good subsystem test for this code
package server.controller; import server.storage.ParkedUsers; import java.net.ServerSocket; import java.net.Socket; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; import java.util.TreeSet; import server.storage.ParkingSpot; /** * This is the server class that controls all data access and flow. * It is also responsible of creating all the parking user objects * once it searches them in the FIU Database. */ public class AccessControlServer extends Thread { private static ParkedUsers garage = ParkedUsers.instance("garage.txt"); private final int portNum; private PrintWriter sout = null; private HashMap displayConnections = new HashMap(); /** * constructor that initializes the port number variable * @param p integer that contains the port number * to which this server will listen to */ public AccessControlServer(int p) { portNum = p; mapConnections(); } /** * helper method that maps the text file into the hashmap */ private void mapConnections() { sout = null; displayConnections.put("security", sout); for(TreeSet t: garage.values()) for(ParkingSpot p: t) { displayConnections.put(p.getParkingNumber(), p.getPrintWriter()); } } @Override public void run() { try { startServer(); } catch(IOException e) { System.out.println("Can't listen on port " + portNum); } } /** * initializes the server with the specified port number and * starts listening for connections * @throws IOException exception thrown if there is a problem * with the server */ public void startServer() throws IOException { ServerSocket ss = new ServerSocket(portNum); while(true) { Socket s = ss.accept(); Thread t = new Thread(new ConnectionHandler(s)); t.start(); } } /** * method to send a message to a client * @param msg sends a string message to the specified client * @param pout the print writer connection to the client */ public void sendMessage(String msg, PrintWriter pout) { pout.println(msg); } /** * send the security display the status of all the parking spots */ public void sendStatus()
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.