Questions
You have developed the overall Virtual Private Cloud (VPC) design for the cloud initiative for Get-Sole...

You have developed the overall Virtual Private Cloud (VPC) design for the cloud initiative for Get-Sole Shoes. Now it is time to examine the infrastructure that would be used within the VPC.

From this week’s reading, review the use of Elastic Compute Cloud (EC2) within a VPC for the servers that will be needed for the company.

Respond to the following in a minimum of 175 words:

  • Discuss possible EC2 designs that can be used for the company. Discuss your rationale for your EC2 recommendations and remember to keep cost (four pillars of cost optimization) as part of your recommendations.

In: Computer Science

1)If an algorithm performs N steps then we say it is O(N) ? 2) An example...

1)If an algorithm performs N steps then we say it is O(N) ?

2) An example of something that is O(N) is(chose one)

A)printing to the screen.B)executing a conditional statement. C) initializing an integer variable. D) looping through an array of size N.

3)Suppose we found the run time of an algorithm was O(2N3 + 4N2 + 5N + 3). What is the Big O notation for the algorithm?

A) O(5N), B) O(4N^2), C) O(N^3), D) O(2N^3)

In: Computer Science

Multiplication of Matrix is one of the tasks that takes time to compute. Note that the...

Multiplication of Matrix is one of the tasks that takes time to compute. Note that the time complexity of multiplying two square matrix is o(n^3) using the nested loops method, and Strassen algorithm improves it to O(n^2.8074). Multi-threading can be used to further enhance this.

Using the matrices below, write

(a) a serial program (the normal nested loops method) to perform the multiplication.

(b) a multithreaded program using pthreads to perform this computation.

(c) compare the execution times of (a) and (b) in a table.

In: Computer Science

TASK: Your task is as follows: (1) Place SN74LS42N (4 to 10 decoder) on a breadboard;...

TASK: Your task is as follows:
(1) Place SN74LS42N (4 to 10 decoder) on a breadboard;
(2) Connect IC pin 8 to GND and IC pin 16 to +5 V for IC to get powered;
(3) Connect GPIO pins to BCD inputs, as follows:
- connect GPIO pin 12 to IC pin 12 (8’s column),
- connect GPIO pin 16 to IC pin 13 (4’s column),
- connect GPIO pin 20 to IC pin 14 (2’s column) and
- connect GPIO pin 21 to IC pin 15 (1’s column).
(4) Connect GPIO pins to DEC Outputs, as follows:
- connect GPIO pin 25 to IC pin 9,
- connect GPIO pin 8 to IC pin 10,
- connect GPIO pin 7 to IC pin 11,
- connect GPIO pin 26 to IC pin 1,
- connect GPIO pin 19 to IC pin 2,
- connect GPIO pin 13 to IC pin 3,
- connect GPIO pin 6 to IC pin 4,
- connect GPIO pin 5 to IC pin 5,
- connect GPIO pin 11 (SCLK) to IC pin 6 and
- connect GPIO pin 9 (MISO) to IC pin 7.
(5) Connect LEDs and resisters, as follows:
- connect LEDs’ anode (+) to GPIO pins 12, 16, 20 and 21,
- connect LEDs’ cathode (-) to one end of resisters and
- connect the other end of resisters to GND.
(6) Develop a python program to generate a random number using random.randint(0,9) (you need import random) and assign this generated number to DEC, instead of manual input. Convert the random number DEC to a 4-bit binary number and generate the binary signal based on the binary number. Check which decimal outputs D0 – D9 are true/false (on/off).

In: Computer Science

Draw the red-black BST that results when you insert letters A through K int order into...

Draw the red-black BST that results when you insert letters A through K int order into an initially empty tree, then describe what happens in general when trees are built by insertion of keys in ascending order. What about descending order?

In: Computer Science

1. Write the set { x | x ∈ R, x2 = 4 or x 2...

1. Write the set { x | x ∈ R, x2 = 4 or x
2 = 9} in list form.
2. {x: x is a real number between 1 and 2} is an
a) finite set
b) empty set
c) infinite set
3. Write set {1, 5, 15, 25,…} in set-builder form.
4. What is the cardinality of each of these sets?
a) {{a}}
b) {a, {a}}
c) {a, {a}, {a, {a}}}
d) {∅}
e) {∅, {∅}, {∅, {∅}}}
5. Suppose that A is the set of sophomores at your school and B is the set of students in
discrete mathematics at your school. Express the following set in terms of A and B:
"the set of students at your school who either are not sophomores or are not taking discrete
mathematics"
a. A
c ∩ Bc
b. A
c U B
c
c. B-A
d. A-B
6. Let A be the set of students who live within one mile of school and let B be the set of
students who walk to classes. Describe the set B-A.
a. The set of students who walk to classes but live more than 1 mile away from school.
b. The set of students who walk to classes but live within 1 mile away from school.
c. The set of students who walk to classes.
7. What is the power set of the set {1, a, b}?
8. Let S = {∅, ?,{?}}Determine whether each of these is an element of S, a subset of S, neither,
or both.
a) {?}
b) {{?}}
c) ∅
d) { {∅ }, ?}}
8. Determine whether each of these statements is true or false.
a) 0 ∈ ∅
b) ∅ ∈ {0}
c) {0} ⊂ ∅
d) ∅ ⊂ {0}
e) {0} ∈ {0}
f) {0} ⊂ {0}
g) {∅} ⊆ {∅}
9. Let A = {a, b, c}, B = {x, y}, and C = {0, 1}.
Find A × B × C.
10. Find A2
if A = {0, a, 3}.

In: Computer Science

You are experiencing issues when trying to transfer files between two computers using FTP. What could...

You are experiencing issues when trying to transfer files between two computers using FTP. What could be the potential cause(s) of the issue? Select all that apply.

Server is not able to resolve the client IP address

Inbound port UDP 21 is blocked in the server

The remote host does not allow connections on high ports 49152 - 65535

Inbound port TCP 21 is blocked in the server

Client is not able to resolve the remote IP address

Which of the following best describes the function of the TTL/hop limit for IP packages?

Prevents a computer from keeping the same IP forever, which could potentially cause IP address conflicts in the network (perhaps due to incorrect DHCP configuration)

Tells the client for how long it should cache the local ephemeral port used in a TCP connection to allow fast reconnections

Indicates to the server for how long it should keep a TCP connection with a specific client to mitigate denial-of-service (DoS) attack

Prevents IP packets from getting stuck in infinite routing loops (perhaps due to incorrect routing tables)

In: Computer Science

Use VB.net to create a loop that posts the first 100 prime numbers. Then, write code...

Use VB.net to create a loop that posts the first 100 prime numbers. Then, write code to confirm the numbers are prime.

In: Computer Science

Pre-Assignment hom Before you start, create a new Eclipse project and create one package in that...

Pre-Assignment

hom

Before you start, create a new Eclipse project and create one package in that project. The package should be called “HW3”

Problem 1

Create a class called “Person”. This class should have, at minimum, the following members and methods. I advise you to add others as you see fit.

// Members

firstName (string)

lastName (string)

age (int)

pAddress (Address)  // This is composition! I suggest using the Address class we defined earlier!

pDOB (Date)  // This is composition!  I suggest using the Date class we defined earlier!

// Constructors

Person()  // Default with age = 0, names null, and DOB and Address default for those classes

Person(firstName, lastName, age)  // Address and DOB will be default for those classes

Person( Person x)  // Copy constructor that does a DEEP COPY of the person object.

// Setters

setFirstName(String firstName)

setLastName(String lastName)

SetName(String firstName, String lastName)

setAge(int newAge)

setAddress(String houseNum, String street, String city, String state, String zip)

setDOB (int day, int month, in year)

// Getters

toString()   // Print out the name, age, dob, and address (use toString from DOB and Address)

getAge()  // return the age

getFirstName()   // return the first name

getLastName()  // return the last name

getDOB()   // Return a COPY OF the date object HINT: Use the date copy constructor!

getAddress() // Return a COPY OF the address object HINT: Use the Address copy constructor!

Problem 2

Test your Person class by creating a new class (in the same “HW3” package and then use the methods to make sure they work properly. I provide no guidance on this since all you need to do is test the methods to make sure they work. Call each and make sure they don’t report errors or fail to execute correctly. Fix any bugs you find. Ask for help if you need it!!!

Problem 3

Create a new class file and call it “Student”. This class will EXTEND on the Person class by adding new data members and methods. Note that students are, in fact, people. This extension makes sense!

// Data members

stuID (String)

major (string)  

level (int)    // 0 = first-year,  1 = sophomore,  2 = junior,   3 = senior,  4 = post-grad

// Constructors

Student(String id, String lastName, String firstName, String major, int level)

Student( Student x)  // Copy constructor that makes a DEEP COPY of Student x object

// Setters

Provide one setter for major, one setter for stuID, and one setter for level. Note that the “level” method should check the input to make sure it makes sense. If something besides a 0, 1, 2, 3, or 4 is provided, the setter should write a warning to screen and refuse to make the change.

// Getters

Provide one getter for major, one getter for stuID, and one getter for level.

// Provide an overrided toString method and use super to also use the inherited toString

toString (String)

// This method should write to screen something like this:

// “Jones, Mary, 21, 544 S Winston St., Kemble, KY 00000, Computer Science, 3”

// Note that you want to use the inherited toString() method here by saying super.toString()

// somewhere in your returned expression.

Problem 4

Create a new class in “HW3” package and call it “testStudent”. Use this class to create multiple student objects and person objects. Test all the methods for accuracy. Make sure you have correct behavior for all of your methods/constructors. Watch out for the copy constructors!!!!

In: Computer Science

The MarsX Space Vehicles Company has been very successful. Due to an increase in demand for...

The MarsX Space Vehicles Company has been very successful. Due to an increase in demand for its STS’s, the company had to hire thousands of scientists, engineers and staff from all over the world. As we all know, not all countries use the same system of measurements. The U.S., Liberia and Burma use the English system; while the rest of the world uses the metric system. In addition scientists use specific scales for some of their applications. To avoid confusion among team members from different countries, the company has commissioned the development and deployment of conversion applications. Your job is to write a program that interchangeably converts between different temperature scales (Celsius, Fahrenheit and Kelvin).

Your job depends on the success of this application. Therefore, make sure you write clean code and test it thoroughly.

Your program must do the following:

  1. Display the menu below and get user input. Re-display the menu until the user enters 4.
  1. Convert from Celsius
  2. Convert from Fahrenheit
  3. Convert from Kelvin
  4. Quit Program

  1. If the user enters 1, prompt the user to enter 3 numbers that represent temperatures expressed in degree Celsius. The program must then convert the temperatures to degree Fahrenheit and Kelvin and output them in a table as follows:

Celsius

Fahrenheit

Kelvin

-10.00

14.00

263.15

0.00

32.00

273.15

100.00

212.00

373.15

  1. If the user enters 2, prompt the user to enter 3 numbers that represent temperatures expressed in degree Fahrenheit. The program should then convert the temperatures to degree Celsius and Kelvin and output them in a table as follows:

Fahrenheit

Celsius

Kelvin

-10.00

-23.33

249.82

0.00

-17.78

255.37

100.00

37.78

310.93

  1. If the user enters 3, prompt the user to enter 3 numbers that represent temperatures expressed in degree Kelvin (no negative numbers allowed, validate). The program should then convert the temperatures to degree Fahrenheit and Celsius and output them in a table as follows:

Kelvin

Fahrenheit

Celsius

0.00

-459.67

-273.15

100.00

-279.67

-173.15

1000.00

1340.33

726.85

  1. If the user enters 4, quit the program.

Needed conversion formulas:

From

To

       Formula

Celsius

Fahrenheit

F = C * (9.0/5.0) + 32

Celsius

Kelvin

K = C + 273.15

Fahrenheit

Celsius

C = (F – 32) * (5.0/9.0)

Fahrenheit

Kelvin

K = (F + 459.67) * (5.0 /9.0)

Kelvin

Fahrenheit

F = K * (9.0/5.0) – 459.67

Kelvin

Celsius

C = K – 273.15

Your program must comply with the following constraints:

  1. Must declare at least the following 4 function prototypes:

int getMenuSelection();                  /*Displays menu and gets user selection*/

void convertFromCelsius();             /*From Celsius to the other scales*/

void convertFromFahrenheit();        /*From Fahrenheit to the other scales*/

void convertFromKelvin();              /*From Kelvin to the other scales*/

  1. The main function must look exactly as shown below:

int main()

{

int menuSelection = 0;

do

       {

system(“cls”);

menuSelection = getMenuSelection();

             switch (menuSelection)

{

       case 1: convertFromCelsius();

             break;

       case 2: convertFromFahrenheit();

             break;

       case 3: convertFromKelvin ();

             break;

       case 4: break; /*Do nothing. Exit Condition*/

       default: printf(“Please enter a number between 1 and 4 \n”);

system(“pause”);

}

       } while (menuSelection != 4);

system(“pause”);

return 0;

}

In: Computer Science

Scenario: Of The Month Club (OTMC) Consider a System Request that has been received for the...

Scenario: Of The Month Club (OTMC)

Consider a System Request that has been received for the following proposed System:  

• Of‐the‐Month Club (OTMC) is an innovative young firm that sells memberships to people who have an interest in certain products.  

• People pay membership fees for 1 year and each month receive a product by mail. For example, OTMC has a coffee‐of‐the‐month club that sends members one pound of special coffee each month.  

• OTMC currently has six memberships (coffee, wine, beer, cigars, flowers, and computer games), each of which costs a different amount.  

• Customers usually belong to just one, but some belong to two or more. • When people join OTMC, the telephone operator records the name, mailing address, phone number, e‐mail address, credit card information, start date, and membership plan(s) (e.g., coffee). A new system would allow members to self-enroll via the web. • Some customers request a double or triple membership (e.g., 2 pounds of coffee, three cases of beer).  

• The computer game membership operates a bit differently from the others. In this case, the member must also select the type of game (action, arcade, fantasy/science fiction, educational, etc.) and age level.  

• OTMC is planning to greatly expand the number of memberships it offers (e.g., video games, movies, toys, cheese, fruit, vegetables), so the system needs to accommodate this future expansion.  

• OTMC is also planning to offer 3‐month and 6‐month memberships.

Part 1:  

Based on the scenario and the high-level requirements described above, create a set of use cases for an information system that would support OTMC operations as described above. Use the fully developed template available in Canvas

Recommendation: In building the major use cases, follow the four‐step process: identify the use cases, identify the steps within them, identify the elements within the steps, and confirm the use cases.

Part 2:

Draw a context diagram and a Level 0 DFD (Data Flow Diagram) for the use cases you developed in part 1.

In: Computer Science

Write a program called distance_square.c that reads an integer n from standard input, and prints an...

Write a program called distance_square.c that reads an integer n from standard input, and prints an nxn pattern of integers. Each integer is the minimum number of steps required to reach the centre of the square. Steps can only be up, down, left or right (no diagonal movement). the question should be allowed to use only while loop

 4  3  2  3  4 
 3  2  1  2  3 
 2  1  0  1  2 
 3  2  1  2  3 
 4  3  2  3  4 

Observing the example above, each integer represents the minimum number of steps required to reach the centre of the square. For example, the top left corner contains the integer 4. The centre of the square can be reached in 4 steps (right, right, down, down).

You can assume n is odd and >= 3.

Make your program match the examples below exactly.

This exercise is designed to give you practice with while loops, if statements and some mathematical operators. Do not use arrays for this exercise!

Note: you are not permitted to use an array in this exercise. and you are suppose to use while loop only!!

./distance_square
Enter square size: 3
 2  1  2 
 1  0  1 
 2  1  2 

./distance_square
Enter square size: 9
 8  7  6  5  4  5  6  7  8 
 7  6  5  4  3  4  5  6  7 
 6  5  4  3  2  3  4  5  6 
 5  4  3  2  1  2  3  4  5 
 4  3  2  1  0  1  2  3  4 
 5  4  3  2  1  2  3  4  5 
 6  5  4  3  2  3  4  5  6 
 7  6  5  4  3  4  5  6  7 
 8  7  6  5  4  5  6  7  8 

./distance_square
Enter square size: 15
14 13 12 11 10  9  8  7  8  9 10 11 12 13 14 
13 12 11 10  9  8  7  6  7  8  9 10 11 12 13 
12 11 10  9  8  7  6  5  6  7  8  9 10 11 12 
11 10  9  8  7  6  5  4  5  6  7  8  9 10 11 
10  9  8  7  6  5  4  3  4  5  6  7  8  9 10 
 9  8  7  6  5  4  3  2  3  4  5  6  7  8  9 
 8  7  6  5  4  3  2  1  2  3  4  5  6  7  8 
 7  6  5  4  3  2  1  0  1  2  3  4  5  6  7 
 8  7  6  5  4  3  2  1  2  3  4  5  6  7  8 
 9  8  7  6  5  4  3  2  3  4  5  6  7  8  9 
10  9  8  7  6  5  4  3  4  5  6  7  8  9 10 
11 10  9  8  7  6  5  4  5  6  7  8  9 10 11 
12 11 10  9  8  7  6  5  6  7  8  9 10 11 12 
13 12 11 10  9  8  7  6  7  8  9 10 11 12 13 
14 13 12 11 10  9  8  7  8  9 10 11 12 13 14 

In: Computer Science

Java Language: Using program created in this lesson as a starting point, create a circular list...

Java Language:

Using program created in this lesson as a starting point, create a circular list with at least four nodes. A circular list is one where the last node is made to point to the first. Show that your list has a circular structure by printing its content using an iterative structure such as a while. This should cause your program to go into an infinite loop so you should include a conditional that limits the number of nodes to be printed to a specific value, for example 20.

Code:

class Node {

int value;

Node nextNode;

Node(int v, Node n)

{

value = v;

nextNode = n;

}

Node (int v)

{

this(v,null);

}

}


class Stack {

protected Node top;

Stack()

{

top = null;

}

boolean isEmpty()

{

return( top == null);

}

void push(int v)

{

Node tempPointer;

tempPointer = new Node(v);

tempPointer.nextNode = top;

top = tempPointer;

}

int pop()

{

int tempValue;

tempValue = top.value;

top = top.nextNode;

return tempValue;

}

void printStack()

{

Node aPointer = top;

String tempString = "";

while (aPointer != null)

{

tempString = tempString + aPointer.value + "\n";

aPointer = aPointer.nextNode;



System.out.println(tempString);

}

}

public class StackWithLinkedList{

public static void main(String[] args){

int popValue;

Stack myStack = new Stack();

myStack.push(5);

myStack.push(7);

myStack.push(9);

myStack.printStack();

popValue = myStack.pop();

popValue = myStack.pop();

myStack.printStack();

}

}

In: Computer Science

Describe the difference between making a class a member of another class (object composition) and making...

Describe the difference between making a class a member of another class (object composition) and making a class a friend of another class.


Explain why memberwise assignment can cause problems with a class that contains a pointer member.


Explain why the parameter of a copy constructor must be a reference.


In: Computer Science

Java- creat a method that takes two char parameters. Return a String containing all characters, in...

Java- creat a method that takes two char parameters. Return a String containing all characters, in order, from the first char parameter (inclusive) to the last (inclusive). For instance, input('a', 'e'), and return "abcde".

In: Computer Science