Question

In: Computer Science

6. Why do you need to declare the data type of a variable before you can...

6. Why do you need to declare the data type of a variable before you can use it in Java? Give two (2) reasons

7. Is the World Wide Web and the Internet just two names for the same entity? Explain.

8. Why was it necessary to use the import statement when we used Scanner and Random?

9. Communication was a problem at Target. What would you recommend as an escalation process if someone encounters a threat and wants it to be known to upper management?

10. TCP is extremely reliable in delivering messages. Explain how this reliability is built into the message distribution process. Optional

11. The Operating System of a computer is the glue that bridges the hardware and software of a computer to make it work. Explain three (3) ways (features) the operating system provides to accomplishes that

. 12. Name the three (3) programming constructs we coded in class using Java along with a description of each one.

Solutions

Expert Solution

PLEASE FIND THE ANSWER(S) and EXPLANATION BELOW.

  1. Why do you need to declare the data type of a variable before you can use in java?
    • We have to declare the variables as:
      • datatype variable_name=value;
    • Example:
      • int num=10;
    • Here the use of mentioning the data type is:
      1. At the compile time itself, find out any type errors.
      2. Since, java is a statically typed language, data types are necessary.
  2. Is the World Wide Web and the Internet just two names for the same entity?
    • NO
      • World Wide web is a collection of information which can be accessed using internet.
      • Internet is a global NETWORK of NETWORKS !!
      • They are not the same.
  3. Why was it necessary to use the import statement when we used Scanner and Random?
    • Because the compiler has to know what is Scanner and Random are !
    • If we use System class, the java compiler already knew that it is from java.lang package, which is already imported by default.
    • But Random and Scanner classes are defined in java.util package.
    • We have to explicitly import them using:
      • import java.util.Random;
      • import java.util.Scanner;
  4. We can approach the managers that has some power and has contributed well to the company for the escalation process if someone encounters a threat and wants it to be known to upper management.
  5. TCP is extremely reliable in delivering messages. Explain how this reliability is built into the message distribution process. ?
    • TCP is a reliable protocol because it delivers the segments of the packet with a sequence number.
    • It will make sure that every data segment has reached perfectly or not.
    • So, TCP also uses the acknowledgement message to be returned after the data is transmitted.
  6. Three (3) ways (features) the operating system :
    1. Memory Management
    2. Input-Output Management
    3. Multi Processor
  7. The following are the programming constructs used in Java:
    1. Memory Management ===> Garbage Collection
    2. Input-Output Management ===> Java.io package
    3. Multi Processor ===> Threading concepts in Java.


Related Solutions

Update the function playScratchOffs to do the following Declare an integer variable to store the type...
Update the function playScratchOffs to do the following Declare an integer variable to store the type of scratch off (i.e. type) Declare an integer variable to store the number of scratch off (i.e. count) Declare an integer variable for loop control (i.e. c) Declare a variable of data type struct OneDollar (i.e. oneSO) Declare a variable of data type struct TwoDollar (i.e. twoSO) Declare a variable of data type struct FiveDollar (i.e. fiveSO) Write a series of printf statements to...
swift language declare a Swift array variable that can hold instances of any class type
swift language declare a Swift array variable that can hold instances of any class type
Part A: Write a set of statements that declare a variable of type double called yourNum,...
Part A: Write a set of statements that declare a variable of type double called yourNum, then prompts the user to input a value which gets stored into that variable. Part B: Write a set of statements that displays the phrase "Even Number!" when the value in the variable count is an even number but displays the phrase “That is odd” otherwise. Declare and initialize all variables. Part C: Write the necessary code to swap (exchange) the values in two...
Why do you believe data can be inaccurate? What can a business do to ensure that...
Why do you believe data can be inaccurate? What can a business do to ensure that data is correct? Explain how bad data will impact information, business intelligence, and knowledge. Argue for or against the following statement: “It is better to make a business decision with bad data than with no data.”
In Java 1a. Declare a legal identifier for a variable called test as type double. 1b....
In Java 1a. Declare a legal identifier for a variable called test as type double. 1b. Create an if.. else statement that will display You get an A if grade is at least 95 else it will display Maybe you get an A next time
Why do some accounts need to be adjusted before the Financial Statements are prepared?
Why do some accounts need to be adjusted before the Financial Statements are prepared?
For this Discussion, you will need to conduct research on capacity and facilities before you can...
For this Discussion, you will need to conduct research on capacity and facilities before you can prepare a complete response to the questions asked. Start this research by reviewing the Web Field Trip resources below. Web Field Trip Store design & construction. (2016). Retrieved from http://supermarketnews.com/news/store-design-construction Phillips, T. (2016). Phillips enterprises, Inc. Food market designs. Retrieved from http://www.foodmarketdesigns.com How to Layout Your Supermarket Be sure each of the questions below is addressed. Address each question individually and be careful not...
b. What do we need to do in order to determine whether a categorical variable can...
b. What do we need to do in order to determine whether a categorical variable can be treated as a normally distributed variable?
b. What do we need to do in order to determine whether a categorical variable can...
b. What do we need to do in order to determine whether a categorical variable can be treated as a normally distributed variable?
Discus why you need to apply improvements for the process before automating it?
Discus why you need to apply improvements for the process before automating it?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT