Answer:
There is no problem. Your main function returns zero to the operating system, which is reported as the exit code. Everything is working correct.
Answer:
enumeration
Explanation:
In computer programming we have the data type called enumeration (enum). This is a data type that is made up of sets of values which are referred to as elements it members. It is a data type in c programming language.
It makes a program to be easy as well as readable by assigning names to constant. To declare this data type the keyword to use is enum.
Answer:
View for question 3 and Page layout for question 4
Explanation:
Answer:
IDS stands for "Intrusion Detection System". IDS is a passive-monitoring system since the main function of the IDS is to monitor the traffic and alert/log any suspicious activity in the traffic (both inbound and outbound). It does nothing to prevent the suspicious traffic.
IPS stands for "Intrusion Prevention System". It has the functionality of IDS and also adds an additional feature of preventing the suspicious traffic from entering the network. This can be done by using rules. "Pass" rules to pass the traffic and "deny" rules to deny the traffic into the network.
Snort - Best opensource IPS. This can be used as IDS also. Refer to their website for the complete details.
Trap and Trace Systems - These systems capture the incoming electronic or other impulses. This systems help in identifying what specific numbers called a specific telephone etc. In today's complex workplace, usage of "Trap and Trace Systems" violates the privacy of the individuals/employees. Having said that, this is completely different from the IDS and IPS. The purpose of the IDS and IPS is to alert or prevent the suspicious traffic from entering the network.
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.