Questions
Please read the question carefully and then provide the answer thanks. Discussion Topic Choose a TCP/IP...

Please read the question carefully and then provide the answer thanks.

Discussion Topic

Choose a TCP/IP service, such as a web browser, email, file transfer, remote shell, DHCP, DNS, network time protocol, network address translation, etc.

Important!

  • Everyone should pick a different service, if possible, to keep the discussion fresh.

In your original post, answer the following about the service you have chosen:

  • How would you determine the IP addresses of your devices on your network?

Success Hints

You can use ipconfig if you use the command line.

You can use whatismyipaddress.com if you have connectivity on your devices.

  • Using Google, determine how to look up your IP address in the Windows 10 GUI.
  • How would you determine if your devices are able to communicate on your network?

Success Hint

You can use ping on your computers. How would you do it on your mobile devices?)

  • Using ipconfig, how do you determine the IP address of your home router?
  • Trace a request and a response with the help of a diagram of the TCP/IP service that you chose.
  • Follow the request and response through each of the TCP/IP layers.
  • Describe what happens at each layer of the OSI and TCP/IP reference models.

In: Computer Science

Suppose you are given a file containing a list of names and phone numbers in the...

Suppose you are given a file containing a list of names and phone numbers in the form "First_Last_Phone."

Write a program to extract the phone numbers and store them in the output file.

Example input/output:

Enter the file name: input_names.txt

Output file name: phone_input_names.txt

1) Name your program phone_numbers.c

2) The output file name should be the same name but an added phone_ at the beginning. Assume the input file name is no more than 100 characters. Assume the length of each line in the input file is no more than 10000 characters.

3) The program should include the following function: void extract_phone(char *input, char *phone); The function expects input to point to a string containing a line in the “First_Last_Phone” form. In the function, you will find and store the phone number in string phone.

Comments would be helpful as well Thanks

In: Computer Science

Give 4 commercial examples of 4 different information systems/platforms from recognized companies, which of the 6...

Give 4 commercial examples of 4 different information systems/platforms from recognized companies, which of the 6 types are they? Which are the organizational levels they mainly serve?

In: Computer Science

Algorithm1 prefixAverages1(X, n) Input array X of n integers Output array A of prefix averages of...

Algorithm1 prefixAverages1(X, n)

Input array X of n integers

Output array A of prefix averages of X

A ← new array of n integers

for i ← 0 to n − 1 do

sX[0]

for j ← 1 to i do

ss + X[j]

A[i] ← s / (i + 1)

return A

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Algorithm2 prefixAverages2(X, n)

Input array X of n integers

Output array A of prefix averages of X

A ← new array of n integers

s ← 0

for i ← 0 to n − 1 do

ss + X[i]

A[i] ← s / (i + 1)

return A

Code up methods for both algorithms. Show through different input examples and using the Current Time method call how the polynomial time algorithm runs slower than the linear time version. Use system.out.println statement to show your results.

programming language: java

In: Computer Science

The Problem Below are a series of problems you need to solve using recursive methods BY...

The Problem

Below are a series of problems you need to solve using recursive methods BY using java . You will write a program that will read commands from an input file, with each command referring to one of the recursive problems to be executed. Each command will be followed (on the same line of input) by the respective parameters required for that problem. (15 points for main method)

  1. DescArrayCheck (15 points)

Write a recursive method that checks whether an array of integers - given as parameter - is sorted in descending order or not.

The result must be 0 if the array is not sorted or if it is sorted in ascending order. 1 if the array is sorted in descending order.

In the main program you need to transform a series of positive integers separated by ';' into an array of integers and pass it as a parameter of this method. This part does not use recursion to transform the string into an array.

Example1:

Command: DescArrayCheck 112;104;52;32;12;10

Result: 1 (Sorted array in descending order).

Example2:

Command: DescArrayCheck 12;14;52;132;212

Result: 0 (Sorted array in ascending order).

Example3:

Command: DescArrayCheck 52;13;21;3

Result: 0 (Unsorted array).

Example4:

Command: DescArrayCheck 14

Result: 1 (Sorted array in descending order).

  1. DecToHex    (15 points)

Write a recursive method that receives a decimal number and converts it to a hexadecimal number. The decimal to hexadecimal conversion can be performed by applying the repeated division and remainder algorithm.

Example1:

Command: DecToHex 4253

Result: 109D

Example2:

Command: DecToHex 314

Result: 13A

  1. Noccurrences    (15 points)

Given a string, a substring, and a number as parameters, write a recursive method that calculates recursively if at least n occurrences of a sub-string exist in string.

Example1:

Command: Noccurrences ababababb bab 2

Result: true (number of occurrence is 3)

Example2:

Command: Noccurrences 2121221222   212   5

Result: false (number of occurrence is 3)

Example3:

Command: Noccurrences yyyyyy yyy   3

Result: true (number of occurrence is 4)

Input File Specifications

You will read in input from a file, "input.in.txt". Have this AUTOMATED. Do not ask the user to the name of the input file. You should read in this automatically. The first line of the input file will have one positive integer, representing the number of commands (lines) inside the input file.

Each of the following n lines will have a command, and each command will be followed by appropriate data as described below (and this data will be on the same line as the command).

The commands (for the 3 recursive methods), and their relevant data, are described below:

DescArrayCheck: This command will be followed by a series of integers separated by ';'.

DecToHex This command will be followed by a single decimal number.

Noccurrences This command will be followed by a string str, a substring subStr and a positive number N representing the number of occurrences of Substr in Str.

Output Format

Your program must output to a file, called "output.out.txt". You must follow the program specifications exactly. Refer to sample output file for exact formatting specifications.

In: Computer Science

One way to improve quick sort is to use an insertion sort on lists that have...

One way to improve quick sort is to use an insertion sort on lists that have a small length (call it the “partition limit”). Why does this make sense?

In: Computer Science

Using C++ Write a program to calculate the amount a customer should pay in a checkout...

Using C++ Write a program to calculate the amount a customer should pay in a checkout counter for the purchases in a bagel shop. The products sold are bagels, cream cheese, and coffee. Use the pseudo code discussed in the class to write the program. Make reasonable assumptions about the prices of bagel, cream cheese, and coffee. Declare prices of bagel, cream cheese, and coffee as constants.

In: Computer Science

                      Contact Manager COMMAND MENU ---------------------------------------------------------- list - Display all contacts view - View

                      Contact Manager

COMMAND MENU

----------------------------------------------------------

list - Display all contacts

view - View a contact

add - Add a contact

del - Delete a contact

exit - Exit program

Command: list

1. Tom van Rossum

2. Edward Idle

Command: view

Number: 2

Name: Edward Idle

Email: [email protected]

Phone: +44 20 7946 0958

Command: add

Name: John Smith

Email: [email protected]

Phone: 559-123-4567

John Smith was added.

Command: list

1. Tom van Rossum

2. Edward Idle

3. John Smith

Command: exit

Bye!

Specifications

 Use the attached CSV file named contacts.csv.

 When the program starts, it should read the contacts from the CSV file.

 For the view and del commands, display an error message if the user enters an invalid

contact number.

 When you add or delete a contact, the change should be saved to the CSV file

immediately. That way, no changes are lost, even if the program crashes later.

In: Computer Science

In c++ Write a recursive driver function that will replace each of the odd values in...

In c++ Write a recursive driver function that will replace each of the odd values in a stack with the cube of the value.

In: Computer Science

Do you support the idea that Internet traffic should flow freely? 2. Do you believe that...

Do you support the idea that Internet traffic should flow freely? 2. Do you believe that the U.S. government should regulate the Internet as acommon carrier? 3. Were you aware of the net neutrality controversy?

Please have it typed out if possible

In: Computer Science

write a Program in C++ Using a structure (struct) for a timeType, create a program to...

write a Program in C++

Using a structure (struct) for a timeType, create a program to read in 2 times into structures, and call the method addTime, in the format:

t3 = addTime(t1, t2);

Make sure to use add the code to reset and carry, when adding 2 times. Also, display the resultant time using a function:

display(t3);

In: Computer Science

Write the methods that insert and remove an element at the kth position in Java using...

Write the methods that insert and remove an element at the kth position in Java using recursion (NOT iteration) (Hint for the remove method: we have to recursive position -1 times, and each time we do the recursion, we have to create a method to move the head to the right)

public void insertRecursive(int position, int data)
{
   //enter code here
}

public int removeAtRecursive(int position)
{
   //enter code here
}

Here is the given class for the Node:

public class Node {
  private int data;
  private Node next;

  public Node(int data)
  {
    this.data = data;
    this.next = null;
  }
  public void setNext(Node next)
  {
    this.next = next;
  }
  public Node getNext()
  {
    return next;
  }

  public void setData(int data)
  {
    this.data = data;
  }

  public int getData()
  {
    return data;
  }
}

In: Computer Science

Write the line x = 0:2:20; in the Command Window of MATLAB and then create a...

Write the line x = 0:2:20; in the Command Window of MATLAB and then create a Simulink model that first loads x from the Workspace, then creates a vector y such that y = 2.5x + ex , and finally sends the vector y back to the Workspace. You will need a From Workspace block, a To Workspace block, two Constant blocks, a Product block, and a Sum block. Note that there is a sample time associated with the From Workspace block; set it and the simulation time such that x is only sampled once.

In: Computer Science

Company ARC Inc. is a medium sized civil engineering firm with 150 employees in offices in...

Company ARC Inc. is a medium sized civil engineering firm with 150 employees in offices in Ontario, Alberta, and British Columbia. The design of the payroll system calculates the hourly, bi-weekly, and monthly compensation wages for temporary, contract, and full-time engineering employees. The company wants to revamp its payroll system with consideration of multiple employee type groups mentioned above. You are assigned to create this payroll system that calculates the correct wages for each employee and report the total wage value before and after taxes. You must consider the following: • Temporary employees: hourly wage only, no benefits, income taxed at 15%. • Contract employees: bi-weekly wage only, no benefits, income taxed at 18%. • Fulltime employees: monthly wage only, benefits deducted at 10%, income taxed at 20%. Create a payroll system using Java with at least two classes: Payroll.java and Employee.java. You can add more classes if you think it is necessary. The application is executed by command line only. (No need for GUI or web application forms.) You must add comments to all the classes and methods. Employee.java technical details: Constructor’s parameters • Employee’s Name, Employee ID, Work Type (T, C, F), Wage Assignment 2 – OOP Payroll Part 1 INFO-6094 – Programming 2 Page: 2 Instant variables • String - Employee Name • int - Employee ID • char - Work Type • double - Wage Methods Use setter and getter methods to manipulate the values inputted. For methods, they should be verbs, mixed case with first letter lowercase, and the first letter of each internal word is capitalized (ie. getEmployeeName(String eName) ). Payroll.java technical details: • You can use a data structure such as an Array to store employee information. • The program should continue to execute unless the optional number value “0” is inputted as an answer. • The system must ask and validate the following for the command line values inputted: Option ‘1’: Which option would you like? ____ What is the employee name? ____ What is the employee ID? ____ What is the employee’s work type? ____ What is the employee’s wage? ____ Employee’s wage after tax: # ********************************************** Then the program will loop back and ask, ‘Which option to choose now?’ It will only exit the loop if input is not 1. Option ‘0’: When the user has inputted 0, the following is displayed: Employee name, employee ID, Work Type, Total Wage before tax, Total Wage after tax 1. William White, 234354, C, $4500.00, $3690.00 2. Christy Carpenter, 045644, F, $5500.00, $3850.00 Etc…. Total employees: # Work types: (#) Temporary, (#) Contract, (#) Full-time Assignment 2 – OOP Payroll Part 1 INFO-6094 – Programming 2 Page: 3 Total wages before tax: # Total wages after tax: # Exit program. If an option value that is NOT ‘0’ or ‘1’ is inputted, then the program exists completely. The user must start again. • To validate errors and report them in the command prompt, consider the following: o the hourly pay cannot exceed 90.00 but can be 0 o the bi-weekly pay cannot be below 1000.00 or more than 3500.00 o the monthly pay cannot be less than 3000.00 o employee name must have at least one space and cannot be less than 5 characters o employee ID must be a positive integer o pay must be a positive value

In: Computer Science

Purpose: This lab will give you experience modifying an existing ADT. Lab Main Task 1: Modify...

Purpose: This lab will give you experience modifying an existing ADT.

Lab

Main Task 1: Modify the ListInterface Java interface source code given below.
Change the name of ListInterface to ComparableListInterface, and have ComparableListInterface inherit from the built-in Java interface Comparable.
Note that Comparable has a method compareTo(). compareTo() must be used in programming logic you will write in a method called isInAscendingOrder() (more about isInAscendingOrder() is mentioned further down in the lab description).

You can find a brief summary on compareTo() at these web pages:

http://chortle.ccsu.edu/java5/notes/chap53b/ch53B_2.html (Links to an external site.)

https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html#compareTo(T) (Links to an external site.)

and in other sources you can find by performing a search for the Java Comparable interface using a web search engine.

Main Task 2: Modify the AList class source code given below by performing the following:
1) change the name of the class from AList to ComparableAList
2) change ListInterface to ComparableListInterface
3) add a method corresponding to the following UML:
            +isInAscendingOrder() : boolean
isInAscendingOrder() returns true if the list is in ascending sorted order, else returns false isInAscendingOrder() should use the compareTo() method that was inherited from ComparableListInterface in order to perform the logic it needs to return true or false.

Note: You MUST use the List ADT method's to perform the logic for isInAscendingOrder(). That is, you must use the methods declared in the interface for the List ADT and defined in the implementation class for the List ADT in the programming logic for isInAscendingOrder().  You will not receive credit for the lab if you try to directly access the list array member and determine from the list array member whether the List ADT is in ascending order in the programming logic for isInAscendingOrder().


Test your solution by writing a driver program. The driver program will have a main() method and is the program that is run at the command line. You may give your driver program any name you like. The driver program should perform a loop, ask for input, and display output in the following way (note that the output in bold is what the user inputs):

Input a list of integers:  5 9 101 183 4893
Your list of integers is in ascending order.
Do you want to continue (y/n):  y

Input a list of integers: 5 9 101 183 48
Your list of integers is not in ascending order.
Do you want to continue (y/n):  y

Input a list of integers:  5 4 100 101 183 4893
Your list of integers is not in ascending order.
Do you want to continue (y/n): y

Input a list of integers:  5 9 101 101 183 4893
Your list of integers is in ascending order.
Do you want to continue (y/n):  y

Input a list of integers:  -48 -7 0 5 9 101 183
Your list of integers is in ascending order.
Do you want to continue (y/n):  y

Input a list of integers:  14
Your list of integers is in ascending order.
Do you want to continue (y/n): y

Input a list of integers:
Your list of integers is in ascending order.
Do you want to continue (y/n):  n


What to submit for the lab:
• your program source code for the List ADT you modified to have inheritance from the Comparable interface, the isInAscendingOrder() method, and the driver program
• a capture the results of the program runs as shown above. You may submit captures of the program run as either a text file that has all of the output of the driver program, or as an image file that has all of the output of the driver program.

In: Computer Science