Questions
Why do think understanding the OSI Model is important from a work standpoint? Give an example.

Why do think understanding the OSI Model is important from a work standpoint? Give an example.

In: Computer Science

How can I make this not add to the counter when the guess is right? void...

How can I make this not add to the counter when the guess is right?

void guessGenerator(string hangmanStar, string wordFromWordtxt)  
{

   char temp = '\0';
   bool win = false;
   int counter = 0;

   while ((win == false) || (counter == 7))
   {
       char temp;
       cout << hangmanStar << endl;
       cout << "? ";
       cin >> temp;
       counter++;

       for (int i = 0; i < wordFromWordtxt.length(); i++)
       {
           if (wordFromWordtxt.at(i) == temp)
           {
               hangmanStar.at(i) = temp;
           }
       }

       if (wordFromWordtxt == hangmanStar)
       {
           win = true;
           cout << "You win." << endl;
           cout << "The word was: " << hangmanStar << endl;
       }
       else if (counter == 7)
       {
           hangManPicture(counter);
           cout << endl;
           cout << "You lost" << endl;
           cout << "Answer: " << wordFromWordtxt << endl;
           return;
       }
       else
       {
           if (hangmanStar.find(temp) == string::npos)
           {
               cout << endl;
               cout << "Oops";
               hangManPicture(counter);
               cout << endl;
           }
           else
           {
               hangManPicture(counter);
               cout << endl;
           }          
       }
   }
   return;
}

In: Computer Science

Complete this programming problem in this assignment by using Microsoft Visual Studio Suite. Compile your solutions...

Complete this programming problem in this assignment by using Microsoft Visual Studio Suite. Compile your solutions for each problem solved in a Word or Google document which includes (a) the pseudocode, (b) the C# codes and (c) the execution result (screen capture just the answer part using Snipping Tool, avoiding non-related or blank spaces). Notice for readability, that the (a) & (b) are in text mode and the (c) is in image mode. Use proper titles and wording in the results, such as Console.WriteLine("The total change to be made is {0:C}.", change); so that the results could be easily understood by a third party reader.

Question: Write a C# program to compute the profit made for selling goldfish flakes online. The wholesale cost for a case of 24-boxes is $118. The price for sale with shipping charge is $9.59 per box. Shipping cost is $1.35 per box. The onlinelisting charge is 12% of the customer payment. The payment processing cost is 4% of the payment. Compute and display the following figures for selling 25 cases of the products: the total wholesale cost for 25 cases; the total revenue for 25 cases of 24 boxes per case, the total listing cost, the total payment processing cost, and the total profit made.

In: Computer Science

Write a JAVA program called DBConvertor that has two methods. The first one converts ANY user...

  • Write a JAVA program called DBConvertor that has two methods. The first one converts ANY user input binary into its equivalent decimal number. The second method converts ANY user input decimal number into its equivalent binary.​
  • binaryToDecimal, decimalToBinary are the names for those methods.​
  • binaryToDecimal receives a binary number as a string and returns a decimal number as an integer. And vice versa for the decimalToBinary method.​

In: Computer Science

1.   (a) We are sending a 30 Mbit MP3 file from a source host to a...

1.  

(a)

  1. We are sending a 30 Mbit MP3 file from a source host to a destination host. All links in the path between source and destination have a transmission rate of 10 Mbps. Assume that the propagation speed is 2*108 meters/sec, and the distance between source and destination is 10,000 km. Now suppose that the MP3 file is broken into 3 packets, each of 10 Mbits. Ignore headers that may be added to these packets. Also ignore router processing delays. Assuming store and forward packet switching at the router, the total delay is ____.

A.

6.05 seconds

B.

4.05 seconds

C.

3.05 seconds

D.

none of the above

(b) Review the car-caravan example in Section 1.4. Again assume a propagation speed of 100 km/hour. Suppose the caravan travels 200 km, beginning in front of one tollbooth, passing through a second tollbooth, and finishing just before a third tollbooth. Now suppose that when a car arrives at the second tollbooth, it proceeds through the tollbooth without waiting for the cars behind it. What is the end-to-end delay?

A.

62 minutes

B.

124 minutes

C.

122 minutes and 12 seconds

D.

122 minutes and 24 seconds

(c) We are sending a 30 Mbit MP3 file from a source host to a destination host. All links in the path between source and destination have a transmission rate of 10 Mbps. Assume that the propagation speed is 2*108 meters/sec, and the distance between source and destination is 10,000 km. Now suppose there is only one link between source and destination, and there are 10 FDM channels in the link. The MP3 file is sent over one of the channels. The end-to-end delay is ____.

A.

30.05 seconds

B.

300 microseconds

C.

3 seconds

D.

none of the above

(d) We are sending a 30 Mbit MP3 file from a source host to a destination host. All links in the path between source and destination have a transmission rate of 10 Mbps. Assume that the propagation speed is 2*108 meters/sec, and the distance between source and destination is 10,000 km. Now suppose there is only one link between source and destination. Also suppose that the entire MP3 file is sent as one packet. The transmission delay is ____.

A.

3 seconds

B.

3.05 seconds

C.

50 milliseconds

D.

none of the above

In: Computer Science

In Linux Terminal 1. Give a command using find to search from the root directory the...

In Linux Terminal

1. Give a command using find to search from the root directory the file program.f and redirect any errors to the file myerrors.txt

2. Give a command for finding files having the letters index as the beginning of the file name and located in your home directory (provide the absolute path)

3. Give a command for finding within a directory called /mp3collection, only those mp3 files that have a size less than 5000 Kilobytes (< 5MB).

4. Give a commmand that searches for those files that are present in the directory /home/david and its subdirectories which end in .c and which have been accessed in the last 10 minutes.

5. Give a command that searches within the directory /mp3-collection for files that have their names beginning with ’Metallica’ and whose size is greater than 10000 kilobytes (> 10 MB).

6. Give a command that searches in the same directory as above case but only for files that are greater than 10MB, but they should not have ’Metallica’ as the starting of their filenames.

In: Computer Science

Using PHP, create a form that uses the method GET. The form should capture a date...

Using PHP, create a form that uses the method GET.

The form should capture a date using two numbers

       Month (1 - 12) and Day (1 - 31)

Make sure the form is filled with the user's input after the form is submitted and processed, and the page is redisplayed.

If data is being passed into the page, then the page should display the date entered by the user and the season of the year. For example, if the user entered 10/12 (October 12), then the results would show something like this:

       The date 10/12 is in Fall.

Use these date ranges to determine the season

      Spring: March 21 - June 20

      Summer: June 21 - September 21

      Fall: September 22 - December 20

      Winter: December 21 - March 20

In: Computer Science

PLEASE READ AND DO NOT COPY AND PASTE THE ANSWER. PROGRAM NEEDS TO INCLUDE MYEXCEPTION.JAVA File...

PLEASE READ AND DO NOT COPY AND PASTE THE ANSWER. PROGRAM NEEDS TO INCLUDE MYEXCEPTION.JAVA

File Factorials contains a program that calls the factorial method of theMathUtils class to compute the factorials of integers entered by the user. Save these files to your directory and study the code in both, then compile and run Factorials to see how it works. Try several positive integers, then try a negative number. You should find that it works for small positive integers (values < 17), but that it returns a large negative value for larger integers and that it always returns 1 for negative integers.

  1. Create a custom exception class called myException. This class should take in one String parameter that can be passed to the super class inside the constructor
  2. Returning 1 as the factorial of any negative integer is not correct—mathematically, the factorial function is not defined for negative integers. To correct this, you could modify your factorial method to check if the argument is negative, but then what? The method must return a value, and even if it prints an error message, whatever value is returned could be misconstrued. Instead it should throw an exception indicating that something went wrong so it could not complete its calculation. Use your myException class to handle the situation. Modify your program as follows:
    1. Modify the header of the factorial method to indicate that factorial can throw a myException.
    2. Modify the body of factorial to check the value of the argument and, if it is negative, throw a myException. Note that what you pass to throw is actually an instance of the myException class, and that the constructor takes a String parameter. Use this parameter to be specific about what the problem is.
    3. Compile and run your Factorials program after making these changes. Now when you enter a negative number an exception will be thrown, terminating the program. The program ends because the exception is not caught, so it is thrown by the main method, causing a runtime error.
    4. Modify the main method in your Factorials class to catch the exception thrown by factorial and print an appropriate message, but then continue with the loop. Think carefully about where you will need to put the try and catch.
  3. Returning a negative number for values over 16 also is not correct. The problem is arithmetic overflow—the factorial is bigger than can be represented by an int. This can also be thought of as a myException — this factorial method is only defined for arguments up to 16. Modify your code in factorial to check for an argument over 16 as well as for a negative argument. You should throw a myException in either case, but pass different messages to the constructor so that the problem is clear.

// ****************************************************************
// Factorials.java
//
// Reads integers from the user and prints the factorial of each.
//
// ****************************************************************
import java.util.Scanner;
public class Factorials
{
   public static void main(String[] args)
   {
       String keepGoing = "y";
       Scanner scan = new Scanner(System.in);
       while (keepGoing.equals("y") || keepGoing.equals("Y"))
       {
           System.out.print("Enter an integer: ");
           int val = scan.nextInt();
           System.out.println("Factorial(" + val + ") = "
                   + MathUtils.factorial(val));
           System.out.print("Another factorial? (y/n) ");
           keepGoing = scan.next();
       }
   }
}

// ****************************************************************
// MathUtils.java
//
// Provides static mathematical utility functions.
//
// ****************************************************************
public class MathUtils
{
   //-------------------------------------------------------------
   // Returns the factorial of the argument given
   //-------------------------------------------------------------
   public static int factorial(int n)
   {
       int fac = 1;
       for (int i=n; i>0; i--)
           fac *= i;
       return fac;
   }
}

In: Computer Science

What are some of the best practices for Malware removal? How are they implemented in companies?

What are some of the best practices for Malware removal? How are they implemented in companies?

In: Computer Science

Using MatLab Transpose and reshape elcentro into a single-column vector named acc. elcentro = [0.00630000000000000   0.00364000000000000  ...

Using MatLab

Transpose and reshape elcentro into a single-column vector named acc.

elcentro = [0.00630000000000000   0.00364000000000000   0.000990000000000000   0.00428000000000000   0.00758000000000000   0.0108700000000000   0.00682000000000000   0.00277000000000000
-0.00128000000000000   0.00368000000000000   0.00864000000000000   0.0136000000000000   0.00727000000000000   0.000940000000000000   0.00420000000000000   0.00221000000000000
0.000210000000000000   0.00444000000000000   0.00867000000000000   0.0129000000000000   0.0171300000000000   -0.00343000000000000   -0.0240000000000000   -0.00992000000000000
0.00416000000000000   0.00528000000000000   0.0165300000000000   0.0277900000000000   0.0390400000000000   0.0244900000000000   0.00995000000000000   0.00961000000000000
0.00926000000000000   0.00892000000000000   -0.00486000000000000   -0.0186400000000000   -0.0324200000000000   -0.0336500000000000   -0.0572300000000000   -0.0453400000000000
-0.0334600000000000   -0.0320100000000000   -0.0305600000000000   -0.0291100000000000   -0.0276600000000000   -0.0411600000000000   -0.0546600000000000   -0.0681600000000000
-0.0816600000000000   -0.0684600000000000   -0.0552700000000000   -0.0420800000000000   -0.0425900000000000   -0.0431100000000000   -0.0242800000000000   -0.00545000000000000
0.0133800000000000   0.0322100000000000   0.0510400000000000   0.0698700000000000   0.0887000000000000   0.0452400000000000   0.00179000000000000   -0.0416700000000000
-0.0851300000000000   -0.128580000000000   -0.172040000000000   -0.129080000000000   -0.0861300000000000   -0.0890200000000000   -0.0919200000000000   -0.0948200000000000
-0.0932400000000000   -0.0916600000000000   -0.0947800000000000   -0.0978900000000000   -0.129020000000000   -0.0765200000000000   -0.0240100000000000   0.0284900000000000
0.0809900000000000   0.133500000000000   0.186000000000000   0.238500000000000   0.219930000000000   0.201350000000000   0.182770000000000   0.164200000000000
0.145620000000000   0.161430000000000   0.177250000000000   0.132150000000000   0.0870500000000000   0.0419600000000000   -0.00314000000000000   -0.0482400000000000
-0.0933400000000000   -0.138430000000000   -0.183530000000000   -0.228630000000000   -0.273720000000000   -0.318820000000000   -0.250240000000000   -0.181660000000000];

In: Computer Science

Respond to the following in a minimum of 175 words: A co-worker interested in learning more...

Respond to the following in a minimum of 175 words:

A co-worker interested in learning more about programming has asked some questions that lead to a discussion about programming logic and data.

Answer the following questions:

  • What are the differences between an algorithm, pseudocode, and data flow diagram?  
  • What parts of the computer can store user data?
  • When designing a program, is it necessary to develop a pseudocode and algorithm?  
  • What are the four basic concepts of object-oriented programming?  
  • What are some of the main advantages and disadvantages of object-oriented programming?

In: Computer Science

How can Vulnerability be prevented in companies? Give an example.

How can Vulnerability be prevented in companies? Give an example.

In: Computer Science

Why do you think Cryptography is important in IT companies? How are they implemented?

Why do you think Cryptography is important in IT companies? How are they implemented?

In: Computer Science

topic:- Fundamentals of Databases * no hand writing *the answer must be unique not copied "plagiarized...

topic:- Fundamentals of Databases

* no hand writing

*the answer must be unique not copied "plagiarized "

______________

Introduction to Data Base

Purpose

The purpose of this assignment is to help you learn more about databases in real life.

Brief Introduction

Databases are important in businesses and organizations because they provide a highly efficient method for handling data. Some of the data that are easily managed include: employee records, student information, payroll, accounting, project management and inventory, etc.. A database management system stores, organizes and manages a large amount of information.

Action Items

  • You are requested to submit one example of application where databases are used and discuss one relation from this database. You need to illustrate attributes and keys.
  • All students have to participate at least twice in the discussions.

Submission Instructions

Post your ideas and responses on the discussion board. At least 1 original posting and 2 responses are mandatory.

In: Computer Science

1) In FDDI, if the value of THT is less than zero, then:     a. The...

1)

In FDDI, if the value of THT is less than zero, then:

    a. The token is released

    b. The token is not released

    c. The read frame is transmitted

    d. The token and the ready frame are both transmitted

2)

In an Ethernet Network, a hub does:

a. Error checking

c. Repeating signals

b. Storing frames then forwarding

d. Filtering frames

3)

What is the term used to describe the communication between a pair of identical layer protocols?

a.End-to-End

c. Peer-to-Peer

b. Link-b -Link

d. Layer-to-Layer

4)

In a distributed system, multiplexing is used if all DTEs are situated in different locations. True or False ?

In: Computer Science