Answer:
import java.io.*;
public class Main
{
public static void main(String[] args) throws IOException {
BufferedReader bufferObject=new BufferedReader(new InputStreamReader(System.in));
String stringObject=bufferObject.readLine();
while(!stringObject.equals("99:99AM")){
System.out.println(convertedTime(stringObject));
stringObject=bufferObject.readLine();
}
}
public static String convertedTime(String stringObject){
String s=stringObject.substring(stringObject.length()-2);
String[] timeObject=stringObject.substring(0,5).split(":");
if(s.equals("AM")){
if(timeObject[0].equals("12")) return "00"+timeObject[1];
else return timeObject[0]+timeObject[1];
}
else{
if(timeObject[0].equals("12")) return "12"+timeObject[1];
else{
int hours=Integer.valueOf(timeObject[0]);
timeObject[0]=String.valueOf(12+hours);
return timeObject[0]+timeObject[1];
}
}
}
}
Explanation:
- Inside the main method run a while loop until stringObject is not equal to the string "99:99AM".
- Call the convertedTime method and display the results.
- Use the same hours and minutes except for 12th hour If the time is in AM.
- Use "00" instead of 12, if it is 12th hour.
- Add hours to 12, if the time is in PM and don't change anything in case of 12.
Answer: Switching packets function.
Explanation: while the main function of a router is to forward packets to their target destination, this can be actualised by adopting a switching packet function.
Switching packet function is the process which the router uses to accept a packet from one interface and passes it to another interface. The main function the switching packet plays is to encapsulate the packets in the right data link frame type for the data link meant to be sent out.
The switching is about moving the packet to the right destination without been mistaken with the layer 2 switch function.
Answer: Web developer
Explanation: Web developer is a job where you have to develop World Wide Web applications by programming or applications that run over the internet, and this degree would need a degree in information technology
The other degrees needed for the following jobs:
1. Radiology engineer: Radiology is a study of diagnosing and treating diseases with the help of medical imaging. So, it needs a degree in medical combined with physics and chemistry.
2. Toxicologist broadcast technician: is a job where the technician has to determine the factors which contributed to a person’s death. So, a person should have a degree in medicine to become a toxicologist technician
Answer:
You can reverse the direction of a ratchet by hitting with an equal or higher amount of force it came at you with.
Explanation: