Questions
In C++, please build a simple Distance Vector program that will communicate with N partners and...

In C++, please build a simple Distance Vector program that will communicate with N partners and do the following. (NOTE: All connections between a server and clients should be TCP/IP socket.)

  1. You will run N instances on your machine
  2. Each instance will run on a different port (instance 1 will run on port 18181, instance 2 on port 18182, instance 3 on port 18183, etc)
  3. The program will start by reading in the appropriate neighbors file and vector file.
  4. The program will ONLY read vectors where the fromNode is equal to that node. For instance, node 1 will only read in vectors where node1 is the fromNode.
  5. The program will support the following requests from clients:
    1. Show files at the server’s current directory: ‘print
      1. This will print the current vector table on a node.
      2. ONLY print valid vectors (don’t print uninitialized ones)
    2. Download files: ‘refresh
      1. This will force the current node to send its vector table to all its neighbors.
    3. Upload files: ‘update
  1. This will be of the form: Update fromNode toNode cost
  2. Update checks that the toNode is the current node. If it is not it is ignored
  3. Update then checks if the toNode-fromNode exists in vector table. If it does not it is added and neighbors are notified
  4. If the pair is in the table, and if the new cost is less than the old cost, that cost is stored and the neighbors are notified.

In: Computer Science

Discuss modern trends in local area networks?

Discuss modern trends in local area networks?

In: Computer Science

2. Write python code for the below instructions (don’t forget to use the keyword “self” where...

2. Write python code for the below instructions (don’t forget to use the keyword “self” where appropriate in your code):

A. Define a Parent Class called Person

a. Inside your Person class, define new member variables called name, age, and gender.   Initialize these variables accordingly.

b. Define the constructor to take the following inputs: name, age, and gender.   Assign these inputs to member variables of the same name.

B. Define Child Class called Employee that inherits from the Person Class

a. Inside your Child class, define new member variables called title and salary.   Initialize these variables accordingly.

b. Define the constructor to take the following inputs: name, age, gender, title, and salary.   Assign these inputs to Class member variables of the same name. Note, you will need to specifically call the Parent constructor method inside the Child constructor, passing the appropriate inputs to the Parent constructor.

C. Instantiate an Employee object called George with the following inputs: name = “George”, age = 30, gender = “Male”, title = “Manager”, and salary = 50000.

D. Print out the object’s name, age, gender, title, and salary in one print statement to the console window. Your output should look like:

“George's info is: Name is George, Age is 30, Gender is Male, Title is Manager, and Salary is 50000”

In: Computer Science

Write a program that takes a string from the user, identifies and counts all unique characters...

Write a program that takes a string from the user, identifies and counts all unique characters in that given string. You are bound to use only built-in string functions where necessary. For identification of unique characters and for counting of the characters make separate functions.

For character identification

Develop a program that takes a string argument, and returns an array containing all unique characters.

For character counting

Develop a program that takes an array returned from above function as an argument along with the given string and return an array containing the total count of each uniquely identified character present in the argument array.

(Dev Cpp +Multifing )

In: Computer Science

If you have been involved in a situation in the workplace where a feasibility analysis was...

If you have been involved in a situation in the workplace where a feasibility analysis was not done and should have been done and time or money (or worker sanity/happiness) was lost, tell us about it (you can change the names of the parties involved). Based on what you've read about decision filters do you think such a practice might have helped? Please remember to write at least 250 words on this topic.

In: Computer Science

Assume that the population of Mexico is 128 million and that the population increases 1.01 percent...

Assume that the population of Mexico is 128 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 323 million and that the population is reduced 0.15 percent annually. Write an application that displays the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display The population of Mexico will exceed the U.S. population in X years.

the answer should look something like this: they want multiple answers. there is a pattern

322, 321, 320, 319, 318, 312, 311, 310, 300, 299, 298, 297, 296, 295, 288, 287, 286

In: Computer Science

Discuss any (5) threats faced by computer network users and what strategies might be used to...

Discuss any (5) threats faced by computer network users and what strategies might be used to prevent each of them from happening .

the instructions of that question are
1- 1000 word or above
2- set refrences
(book,www,journal artical from the full-text databases, current affairs magazine , newspaper )

In: Computer Science

Write a program that calculates and prints the bill for a cellular telephone company. The company...

Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of services: regular and premium. Its rates vary depending on the type of service. The rates are computed as follows:

Regular service: $10.00 plus the first 50 minutes are free. Charges for over 50 minutes are $0.20 per minute.

Premium Service:        $25.00 plus

in C++ (Basic)

  1. For calls made from 6:00 A.M. to 6:00 P.M., the first 75 minutes are free; charges for over 75 minutes are $0.10 per minute.
  2. For calls made from 6:00 P.M. to 6:00 A.M., the first 100 minutes are free; charges for over 100 minutes are $0.05 per minute.

Your program should output the type of service, number of minutes the telephone service was used, and the amount due from the user.

For the premium service, the customer may be using the service during the day and night. Therefore, to calculate the bill, you must ask the user to input the number of minutes the service was used during the day and the number of minutes the service used during the night.

In: Computer Science

A state is divided into R*C cities.The government has launched an initiative to find the cities...

A state is divided into R*C cities.The government has launched an initiative to find the cities which are dominated by coders. Each city may or may not have coders residing in it. If the city is dominated by coders, it is marked with 1 else it is marked with 0. Two cities are termed as connected cities if they both are dominated by coders and can be reached by moving vertically, horizontally, or diagonally.

Example:

The given is the state with 3*3 cities and their dominance representation.

City[1, 1] is directly connected to City[1, 2].

City[1, 2] is directly connected to City[1, 1], City[1, 3] and City[2, 3].

City[1, 3] is directly connected to City[1, 2] and City[2, 3].

City[2, 3] is directly connected to City[1, 2] and City[1, 3].

City[3, 1] is not connected to any of the other coder dominant cities.

One or more coder dominant connected cities form the Coding belt. In a belt, there may be coder dominant cities which are not directly connected but can be reached by moving through other dominant cities. It is possible that there are multiple coding belts in the state.

Example:

The given is the state with 3*3 cities and their dominance representation.

For the given example, there are two coding belts. C1 represents Coding Belt 1 and C2 represents Coding Belt 2.

The government wants to find the number of coder dominant cities in the largest coding belt.

The government will give you the credits in the initiative. Can you help the government?


Note: For the given example, there are 4 coder dominant cities in the largest coding belt.

Input Format

The first line of input consists of two space-separated integers, number of rows, R, and number of columns, C.

Next R lines each consist of C space-separated integers.


Constraints

1<= R, C <=10

Output Format

Print the number of coder dominant cities in the largest Coding belt.

Sample TestCase 1

Input

5 51 1 1 0 00 1 1 0 00 0 0 0 11 0 0 1 11 1 0 0 1

Output

5

Explanation

There are three belts in the given 5*5 cities.

Coding Belt 1 (C1): Number of Coder Dominant Cities = 5

Coding Belt 2 (C2): Number of Coder Dominant Cities = 4

Coding Belt 3 (C3): Number of Coder Dominant Cities = 3

In: Computer Science

Randomly generate 0, 1, or 2 in a 100 by 100 2d array. For each entry...

Randomly generate 0, 1, or 2 in a 100 by 100 2d array.
For each entry in the 2d array, count the number of 0’s and 1’s in the surrounding entries.
Save the result in two 2d arrays: one for the number of 0’s, one for the number of 1’s.
For example:
0   0   1
2   1   0
0   0   0

The number of 0’s for a[0][0] is 1; the number of 1’s for a[0][0] is 1;
The number of 0’s for a[0][1] is 2; the number of 1’s for a[0][1] is 2;
The number of 0’s for a[0][2] is 2; the number of 1’s for a[0][2] is 1;
The number of 0’s for a[1][0] is 4; the number of 1’s for a[1][0] is 1;
The number of 0’s for a[1][1] is 6; the number of 1’s for a[1][1] is 1;
The number of 0’s for a[1][2] is 3; the number of 1’s for a[1][2] is 2;
The number of 0’s for a[2][0] is 1; the number of 1’s for a[2][0] is 1;
The number of 0’s for a[2][1] is 3; the number of 1’s for a[2][1] is 1;
The number of 0’s for a[2][2] is 2; the number of 1’s for a[2][2] is 1;

In: Computer Science

3.1 Bratko states that iterative deepening combines the best properties of breadth-first search and depth-first search...

3.1 Bratko states that iterative deepening combines the best properties of breadth-first search and depth-first search and is therefore, in practice, often the best choice
amongst the basic search methods. Discuss this statement.


3.2 Discuss the concept of the ‘locality’ of the effects of actions in the context of planning problems.

In: Computer Science

Declare two 2d arrays n0[MAX_ROW][MAX_COL], n1 [MAX_ROW][MAX_COL]. Then, loop through the 2d array and save the...

Declare two 2d arrays n0[MAX_ROW][MAX_COL], n1 [MAX_ROW][MAX_COL].
Then, loop through the 2d array and save the results in n0 and n1:

for (i=0; i<MAX_ROW; i++)
  for (j=0; j<MAX_COL;j++){
       //calculate number of zeros around entry a[i][j]
       n0[i][j] =
       //calculate number of ones around entry a[i][j]
       n1[i][j] =
  }

Set the MAX_ROW and MAX_COL to a small number and display all three 2d arrays on the screen to verify that the calculations are correct. You may still use command-line inputs as in the example program to set the actual size of the array (must be less than or equal to MAX_ROW, MAX_COL.

In: Computer Science

You are going to begin the process of data gathering. There are three types of data...

You are going to begin the process of data gathering. There are three types of data you will be gathering – Administrative, Technical and Physical. For this assignment, you will be gathering your administrative data. This data will be created by you for your fictitious company. You may use as many resources as you need in order to develop this data. The Internet, data from real companies, and data you just make up on your own may be used. Areas of data that need to be gathered are as follows:

  • Human Resources
    • Recruitment – steps for hiring new employees
    • Employment – policies and procedures employees must follow
    • Termination – steps for terminating employees
  • Organizational Structure
    • Senior Management – how is the senior management structured
    • Security Program – how is this structured. What are the components and policies and procedures
    • Security Operations – what are the policies and procedures and how is this structured
    • Audit – how are these performed and how often
  • Information Control
    • User Accounts – what is the process for creating and managing them
    • User Error – how is this tracked and what happens in the event of user error
    • Asset Control – how are assets protected, assigned value and monitored
    • Sensitive Information – what sensitive information exists, how is it protected and what are the policies and procedures
  • Business Continuity
    • Contingency Planning – do they have it and how is it managed
    • Incident Response Program – do they have it and how is it managed
  • System Security
    • System Controls – what are they and do they need to be improved
    • Application Security – what is in place and is it effective
    • Configuration Management – what do they have in place, what are the policies and procedures and how often is it updated
    • Third Party Access – who has access to any of the assets and how is it controlled

All of the above information will be documented in the risk assessment. In some cases it will be tested and questions to appropriate personnel will be asked.

In: Computer Science

Write C code to approximate Sin(x) and Cos(x) function using Taylor’s series. The angle x is...

Write C code to approximate Sin(x) and Cos(x) function using Taylor’s series. The angle x is expressed in radians. Use the first FIVE terms of Taylor’s series to approximate Sine/Cosine function.

a. Compare your Taylor’s series approximation of Sine/Cosine function with the math.h implementation of sin and cos function.

b. Determine tan(x) from Taylor’s series approximation of Sine/Cosine functions, for x = 0, PI/4, PI/2, PI. Use PI = 3.14159.

In: Computer Science

write a comprehensive research on Architectural styles and frameworks that are used in software development, and...

write a comprehensive research on
Architectural styles and frameworks that are used in software development, and complete the following:


From your research, select an architectural style that is used in a real-world system.


Describe the real-world system and the architectural style.


Justify why this architectural style is well-suited for the selected real-world system.


In: Computer Science