Answer:
que pinga this is a hw website not snap
Explanation:
Consider a Stop-and-Wait protocol. Assume constant delays for all transmissions and the same delay for packets sent and ACKs sent. Assume no errors occur during transmission.
(a) Suppose that the timeout value is set to 1/2 of what is required to receive an acknowledgement, from the time a packet is sent. Give the complete sequence of frame exchanges when the sender has 3 frames to send to the receiver.
(b) Suppose that the timeout value is sent to 2 times the round trip time. Give the sequence of frame exchanges when 3 frames are sent but the first frame is lost.
Explanation:
question a) answer:
At the moment when it sends the package, then it has a waiting time for the acknowledgement from the receiver, however, the time will be split in two when the frameset size becomes two, meaning that two packages have been sent together, causing the receiver to acknowledge only one package.
question b) answer:
The timeout is equal to two times.
In cases when the frame size is 3, the frame will be lost since the timeout turns to be 2 times. Because the sender has to wait for the acknowledgement, therefore it will send other of the parcels.
Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program:
Min miles: -10
Max miles: 40
Here's what I have so far:
import java.util.Scanner;
public class ArraysKeyValue {
public static void main (String [] args) {
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i = 0;
int j = 0;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
milesTracker[0][0] = -10;
milesTracker[0][1] = 20;
milesTracker[1][0] = 30;
milesTracker[1][1] = 40;
//edit from here
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] > maxMiles){
maxMiles = milesTracker[i][j];
}
}
}
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] < minMiles){
minMiles = milesTracker[i][j];
}
}
}
//edit to here
System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}
Answer: 40, 4
Explanation:
Write a Python code to ask a user to enter students' information including name,
last name and student ID number. The program should continue prompting the
user to enter information until the user enters zero. Then the program enters
search mode. In this mode, the user can enter a student ID number to retrieve
the corresponding student's information. If the user enters zero, the program
stops. (Hint: consider using list of lists)
database = ([[]])
while True:
first_name = input("Enter the student's first name: ")
if first_name == "0":
while True:
search = input("Enter a student ID number to find a specific student: ")
if [] in database:
database.pop(0)
if search == "0":
exit()
k = 0
for w in database:
for i in database:
if i[2] == search:
print("ID number: {} yields student: {} {}".format(i[2], i[0], i[1]))
search = 0
last_name = input("Enter the student's last name: ")
id_number = input("Enter the student's ID number: ")
database.append([first_name, last_name, id_number])
I hope this helps!
the language is Java! please help
public class Drive {
int miles;
int gas;
String carType;
public String getGas(){
return Integer.toBinaryString(gas);
}
public Drive(String driveCarType){
carType = driveCarType;
}
public static void main(String [] args){
System.out.println("Hello World!");
}
}
I'm pretty new to Java myself, but I think this is what you wanted. I hope this helps!
Which of the following is true of how packets are sent through the internet?
Answer:
It is A: Packet metadata is used to route and reassemble information travelling through the internet.
Explanation:
Step 1: The Internet works by chopping data into chunks called packets. Each packet then moves through the network in a series of hops. Each packet hops to a local Internet service provider (ISP), a company that offers access to the network -- usually for a fee
Step 2: Entering the network
Each packet hops to a local Internet service provider (ISP), a company that offers access to the network -- usually for a fee.
Step 3: Taking flight
The next hop delivers the packet to a long-haul provider, one of the airlines of cyberspace that quickly carrying data across the world.
Step 4: BGP
These providers use the Border Gateway Protocol to find a route across the many individual networks that together form the Internet.
Step 5: Finding a route
This journey often takes several more hops, which are plotted out one by one as the data packet moves across the Internet.
Step 6: Bad information
For the system to work properly, the BGP information shared among routers cannot contain lies or errors that might cause a packet to go off track – or get lost altogether.
Last step: Arrival
The final hop takes a packet to the recipient, which reassembles all of the packets into a coherent message. A separate message goes back through the network confirming successful delivery.
In Microsoft windows which of the following typically happens by default when I file is double clicked
Answer:
when a file is double clicked it opens so you can see the file.
Explanation:
Write a program that asks the user to enter a 10-character telephone number in the format XXX-XXX-XXXX. The application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. For example, if the user enters 555-GET-FOOD, the application should display 555-438-3663.
In python:
number = input("Enter a 10-character phone number: ")
for i in number:
if i.isalpha():
if i == "A" or i == "B" or i == "C":
i = "2"
elif i == "D" or i == "E" or i == "F":
i = "3"
elif i == "G" or i == "H" or i == "I":
i = "4"
elif i == "J" or i == "K" or i == "L":
i = "5"
elif i == "M" or i == "N" or i == "O":
i = "6"
elif i == "P" or i == "Q" or i == "R" or i == "S":
i = "7"
elif i == "V" or i == "T" or i == "U":
i = "8"
elif i == "W" or i == "X" or i == "Y" or i == "Z":
i = "9"
print(i, end="")
I hope this helps!
Code:
def phonenumber():
alpha = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
n =[2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9]
phone = input('Enter phone number in format of XXX-XXX-XXXX : ').upper()
index = 0
for index in range(len(phone)):
if phone[index].isalpha():
print (n[alpha.index(phone[index])], end = ' ')
else:
print (phone[index], end = ' ')
phonenumber()
Compilation output is attached below:
Learn More:https://brainly.com/question/15687460
Explain why you have to import JOptionPane but not the Math class
Answer:
To provide standard dialog boxes such as message dialog box, confirm dialog box and input dialog box.
In Java, the import statement is used to include classes or packages from outside sources in your code. This lets you access and use the features of those classes or packages.
What is the JOptionPaneTo do the above, You need to import JOptionPane in Java because it belongs to a different package from the Math class.
The Math class is a part of the java. lang package, which is automatically included in Java. This package has important classes and interfaces that are used in Java programs. Because the Math class is already included in this package, you don't have to import it separately.
Read more about JOptionPane here:
https://brainly.com/question/13101293
#SPJ2
The purpose of performance profiling (experimental analysis) is to measure the program/algorithm performance. Assume that you have performed an experimental analysis of an algorithm, and profiling returned the following
times: for instances of sizes 2^10, 2^11, 2^12, 2^13, 2^14
the corresponding times are approximately 300 , 510 , 905 , 1750 , 3305 milliseconds.
In these collected running times, there is an extra overhead resulting from clocking program performance and OS functions calls, and this overhead has to be considered in analyzing data. That is, the measured time consists of two components: the time for executing the operations, plus the overhead from profiling.
The estimated overhead due to profiling is about 100 milliseconds independently of the input size. (that is, 100 is always an additive ``constant'' in the collected times).
Based on these experimental results, what is the running time, as a function of the problem size, for executing this algorithm? (c is a constant).
A. O(underroot(n)).
B. O(n^2).
C. O(n).
D. None of the listed.
E. O(n log n).
Answer:
C. O(n).
Explanation:
for better understanding, the os is a program that helps in telling how much resources can be used and when processor can be accessed.
to each programme data structures would load and unload every time that a programme is to be run.
while a programme is being managed there would be extra overheads and based on whatever type of os or programme that this is, it may or may not have fixed overhead
from our question overhead is fixed at 100ms
we have,
net time as: 300-100, 510-100, 905-100, 1750-100, 3305-100,
which is, 200, 410, 805, 1650, 3205
when we double 2¹⁰ to 2¹¹ to 2¹² etc, the programme ran is also doubling
this says that run time is same as size of instance n
O(n)
(1) Prompt the user to enter a string of their choosing. Output the string.
Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself.
(2) Complete the GetNumOfCharacters() function, which returns the number of characters in the user's string. Use a for loop in this function for practice. (2 pts)
(3) In main(), call the GetNumOfCharacters() function and then output the returned result. (1 pt) (4) Implement the OutputWithoutWhitespace() function. OutputWithoutWhitespace() outputs the string's characters except for whitespace (spaces, tabs). Note: A tab is '\t'. Call the OutputWithoutWhitespace() function in main(). (2 pts)
Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself. Number of characters: 46 String with no whitespace: The only thing we have to fear is fear itself.
Answer:
See solution below
See comments for explanations
Explanation:
import java.util.*;
class Main {
public static void main(String[] args) {
//PrompT the User to enter a String
System.out.println("Enter a sentence or phrase: ");
//Receiving the string entered with the Scanner Object
Scanner input = new Scanner (System.in);
String string_input = input.nextLine();
//Print out string entered by user
System.out.println("You entered: "+string_input);
//Call the first method (GetNumOfCharacters)
System.out.println("Number of characters: "+ GetNumOfCharacters(string_input));
//Call the second method (OutputWithoutWhitespace)
System.out.println("String with no whitespace: "+OutputWithoutWhitespace(string_input));
}
//Create the method GetNumOfCharacters
public static int GetNumOfCharacters (String word) {
//Variable to hold number of characters
int noOfCharactersCount = 0;
//Use a for loop to iterate the entire string
for(int i = 0; i< word.length(); i++){
//Increase th number of characters each time
noOfCharactersCount++;
}
return noOfCharactersCount;
}
//Creating the OutputWithoutWhitespace() method
//This method will remove all tabs and spaces from the original string
public static String OutputWithoutWhitespace(String word){
//Use the replaceAll all method of strings to replace all whitespaces
String stringWithoutWhiteSpace = word.replaceAll(" ","");
return stringWithoutWhiteSpace;
}
}
5-5. Design an Ethernet network to connect a single client P C to a single server. Both the client and the server will connect to their workgroup switches via U T P. The two devices are 900 meters apart. They need to communicate at 800 M b p s. Your design will specify the locations of any switches and the transmission link between the switches.
5-6. Add to your design in the previous question. Add another client next to the first client. Both connect to the same switch. This second client will also communicate with the server and will also need 800 M b p s in transmission speed. Again, your design will specify the locations of switches and the transmission link between the switches.
Answer:
ok so u have take the 5 and put 6
Explanation:
5-5. Ethernet network design: UTP connections from client PC and server to workgroup switches, 900m fiber optic link between switches, 800 Mbps communication.
5-6. Additional client connects to the same switch, UTP connection, maintains existing fiber optic link, 800 Mbps communication with the server.
What is the explanation for this?5-5. For connecting a single client PC to a single server, both located 900 meters apart and requiring communication at 800 Mbps, the following Ethernet network design can be implemented:
- Client PC and server connect to their respective workgroup switches via UTP.
- Use fiber optic cables for the 900-meter transmission link between the switches.
- Install switches at the client PC and server locations.
- Ensure that the switches support at least 1 Gbps Ethernet speeds to accommodate the required transmission speed.
5-6. In addition to the previous design, for adding another client next to the first client:
- Connect both clients to the same switch.
- Use UTP cables to connect the second client to the switch.
- Ensure the switch supports 1 Gbps Ethernet speeds.
- Maintain the existing fiber optic transmission link between the switches.
- The second client can also communicate with the server at the required 800 Mbps transmission speed.
Learn more about Network Design at:
https://brainly.com/question/7181203
#SPJ2
Which function is used to display a string value to the screen?
main[]
print()
run=
SHOW!
Answer:
The correct answer to this question is given below in the explanation section.
Explanation:
in most programming languages, the print() function is used to display a string value to the screen. Because, the print function prints all the string given in it as a parameter.
for example: to print hello world.
we use the function to print hello world as print("hello world").
However, it noted that other options are not correct because the main() function is an entry point of a program and it does not print string value to the screen. while run and show function do not print string value of screen also.
Answer:
in python print()
On what date was jschlatt originally added to the dreamsmp server, and on which date was his second appearance on the server?
since this has already been answered, who is your favorite SMP character?
mines Wilbur/ Ghostbur
some people will disagree with me but jshlatt is one of my favorite characters on the dream smp . But my all time favorite characters is ALL of Wilbur's characters
Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate the risks associated with future investment decisions, and offers his clients real-time information immediately. Which type of data processing is Jason following in the transaction processing system?
A.
online decision support system
B.
online transaction processing
C.
online office support processing
D.
online batch processing
E.
online executive processing
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct answer to this question is online decision support system. Because the decision support systems process the data, evaluate and predict the decision, and helps the decision-makers, and offer real time information immediately in making the decision in an organization. So the correct answer to this question is the decision supports system.
Why other options are not correct
Because the transaction processing system can only process the transaction and have not the capability to make the decision for the future. Office support processing system support office work, while the batch processing system process the task into the batch without user involvement. however, online executive processing does not make decisions and offer timely information to decision-makers in an organization.
Which of the following is NOT a period of the Middle Ages?
Early Middle Ages
O Late Middle Ages
O High Middle Ages
O New Middle Ages
allowing is NOT an artifact of the Information Age?
The one that is not a period of the Middle Ages is the High Middle Ages. The correct option is c.
What are different ages?The Middle Ages, which roughly correspond to the years 500 to 1400–1500 BCE, is the term used to describe this time of European history. The phrase was initially used by academics in the 15th century to refer to the time frame between their own era and the dissolution of the Western Roman Empire.
The period between the fall of Imperial Rome and the start of Early Modern Europe is referred to as the “Middle Ages” for this reason. The reason the Middle Ages are known as the Dark Ages is that life was hard and brief in Europe, and contrasted with the orderliness of classical antiquity.
The time period in European history from roughly 500 AD to 1500 AD. This time period's early years are commonly referred to as the Dark Ages.
Therefore, the correct option is c, High Middle Ages.
To learn more about the middle ages, refer to the link:
https://brainly.com/question/26586178
#SPJ6
Need help with coding.
I'm trying to input a list that uses int(input("Element: ")) and it's causing an error. Anything to help with this?
You could try something likes this.
lst = []
n = int(input("Number of elements: ))
for i in range(0, n):
element = int(input("Element: "))
lst.append(element)
QUICK!! URGENT!! I'll provide more point if u give me the right code for this specific program. I truly don't understand if statements :(
Answer:
5467373737474737377474747
Memory locations in personal computers are usually given in hexadecimal. If a computer programmer writes a program that requires 100 memory locations, determine the last memory location that is used if the program starts at location 2C8DH 16 hexadecimal
Answer:
The answer is "The last memory addresses used by a specific program is 2CF0".
Explanation:
For this specific problem, we assume that only a memory storage allocation like Array data structure is needed, as well as any allocation only needs one memory cell since it focuses on the structure and type of data used.
So, first, we will transform the provided memory address for better comprehension from Hexadecimal into decimal.
[tex]\to \bold{(2C8D)_{16} = (11405)_{10}}[/tex]
Now 11405 is the first memory cell's address. With all of this number, it can add 99, resulting in the final decimal memory address.
[tex]=11405 + 99\\\\= 11504[/tex]
[tex]\bold{(11504)_{10} = (2CF0)_{16}}.[/tex]
Select the correct answers.
What are examples of real-time applications?
A.) news updates
B.) blog posts
C.) stock market values
D.) email
E.) online money transfers
Answer:
B
Explanation:
you can post blog updates in real time as things happen
Answer: Stock market values and news updates
Explanation: These are things that you can follow in real time and that happen in real time (think of something like a livestream)
PLATO/EDMENTUM
What is the maximum number of VLANs that can be configured on a switch supporting the 802.1Q protocol? Why?
Answer:
4096 VLANs
Explanation:
A VLAN (virtual LAN) is a group of devices on one or more LAN connected to each other without physical connections. VLANs help reduce collisions.
An 802.1Q Ethernet frame header has VLAN ID of 12 bit VLAN field. Hence the maximum number of possible VLAN ID is 4096 (2¹²). This means that a switch supporting the 802.1Q protocol can have a maximum of 4096 VLANs
A lot of VLANs ID are supported by a switch. The maximum number of VLANs that can be configured on a switch supporting the 802.1Q protocol is 4,094 VLANS.
All the VLAN needs an ID that is given by the VID field as stated in the IEEE 802.1Q specification. The VID field is known to be of 12 bits giving a total of 4,096 combinations.But that of 0x000 and 0xFFF are set apart. This therefore makes or leaves it as 4,094 possible VLANS limits. Under IEEE 802.1Q, the maximum number of VLANs that is found on an Ethernet network is 4,094.
Learn more about VLANs from
https://brainly.com/question/25867685
What are two examples of items in Outlook?
a task and a calendar entry
an e-mail message and an e-mail address
an e-mail address and a button
a button and a tool bar
Answer:
a task and a calendar entry
Explanation:
ITS RIGHT
Answer:
its A) a task and a calendar entry
Explanation:
correct on e2020
Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate the risks associated with future investment decisions, and offers his clients real-time information immediately. Which type of data processing is Jason following in the transaction processing system?
A.
online decision support system
B.
online transaction processing
C.
online office support processing
D.
online batch processing
E.
online executive processing
I believe the answer is A. because he has to listen to what the people tell him and he information he has to think about and make a choice on what to reply with.
I hope this helps and its correct please let me know if its wrong have a great day//night.
Plz answer me will mark as brainliest
Answer:
True
Operating System
Booting
What is his resolution amount
Write a program that reads in 10 numbers from the user and stores them in a 1D array of size 10. Then, write BubbleSort to sort that array – continuously pushing the largest elements to the right side
Answer:
The solution is provided in the explanation section.
Detailed explanation is provided using comments within the code
Explanation:
import java.util.*;
public class Main {
//The Bubble sort method
public static void bb_Sort(int[] arr) {
int n = 10; //Length of array
int temp = 0; // create a temporal variable
for(int i=0; i < n; i++){
for(int j=1; j < (n-i); j++){
if(arr[j-1] > arr[j]){
// The bubble sort algorithm swaps elements
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
}
}
}
}
public static void main(String[] args) {
//declaring the array of integers
int [] array = new int[10];
//Prompt user to add elements into the array
Scanner in = new Scanner(System.in);
//Use for loop to receive all 10 elements
for(int i = 0; i<array.length; i++){
System.out.println("Enter the next array Element");
array[i] = in.nextInt();
}
//Print the array elements before bubble sort
System.out.println("The Array before bubble sort");
System.out.println(Arrays.toString(array));
//Call bubble sort method
bb_Sort(array);
System.out.println("Array After Bubble Sort");
System.out.println(Arrays.toString(array));
}
}
B1:B4 is a search table or a lookup value
Answer:
lookup value
Explanation:
The fraction 460/7 is closest to which of the following whole numbers?
Plz answer me will mark as brainliest
Answer:
7. true
8.B
Hopefully those are correct!
Explanation:
Read the following code:
x = 1
while(x < 26)
print(x)
x = x + 1
There is an error in the while loop. What should be fixed?
1. Add a colon to the end of the statement
2. Begin the statement with the keyword count
3. Change the parentheses around the test condition to quotation marks
4. Use quotation marks around the relational operator
This is python code.
In python, you are supposed to put a colon at the end of while loops. This code does not have a colon after the while loop, therefore, you need to add a colon to the end of the statement.
The error to be fixed in the while loop is to add a colon at the end of the while statements.
x = 1
while (x<26)
print(x)
x = x + 1
This is the right code;
x = 1
while(x < 26):
print(x)
x = x + 1
The actual code , the while statement is missing a colon at the end of it.
The code is written in python. In python while or for loops statements always ends with a colon.
In the error code, there was no colon at the end of the while loop.
The right codes which I have written will print the value 1 to 25.
learn more on python loop here: https://brainly.com/question/19129298?referrer=searchResults
Kara's teacher asked her to create a chart with horizontal bars. Which chart or graph should she use?
Bar graph
Column chart
Line graph
Pie chart
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct answer to this question is the Bar graph.
Because we use this chart type to visually compare values across a few categories when the charts show duration or when the category text is long.
However, we can present information similarly in the bar graph and in column charts, but if you want to create a chart with the horizontal bar then you must use the Bar graph. In an Excel sheet, you can easily draw a bar graph and can format the bar graph into a 2-d bar and 3-d bar chart.
A column chart is used to compare values across a few categories. You can present values in columns and into vertical bars.
A line graph chart is used to show trends over months, years, and decades, etc.
Pie Chart is used to show a proportion of a whole. You can use the Pie chart when the total of your numbers is 100%.
Answer:
Bar graph option A
Explanation:
I did the test