Questions
A situation in which the source of information is more sensitive than the information itself. Explain...

A situation in which the source of information is more sensitive than the information itself. Explain why the sum of sensitive data might also be sensitive.

In: Computer Science

*****Software Engineering Define the following : QUESTION 1 1.1) Contract Software 1.2) Internal Software Development 1.3)...

*****Software Engineering

Define the following :

QUESTION 1

1.1) Contract Software

1.2) Internal Software Development

1.3) Client

1.4) Object

In: Computer Science

Briefly describe an example scenario where a strategy design pattern is suitable to use.

Briefly describe an example scenario where a strategy design pattern is suitable to use.

In: Computer Science

Answer the following multiple-choice questions: A TCP receiver received an expected segment, without error, but yet...

Answer the following multiple-choice questions:

  1. A TCP receiver received an expected segment, without error, but yet has not ACKed the sender. What might be the reason for that?
  1. It is actually a lost segment.
  2. It is actually a duplicate segment.
  3. The use of Stop-and-wait mechanism.
  4. The use of Delayed ACK.
  5. The use of a large window size.
  1. If a TCP receiver received 2 segments with sequence number 34 and 58, the second segment was corrupted and discarded. What action could be taken to fix this? (Recall in TCP, ACK number is the next expected 1st byte number in the next segment & TCP uses cumulative ACK means all segments received with sequence number less than ACK number have been received correctly)
  1. Receiver sends ACK number 34
  2. Receiver sends ACK number 58
  3. Receiver sends ACKs number 34 & 58
  4. Receiver just waits for timeout
  1. Receiver Window value in TCP header is used for ___________
  1. Go-back N window
  2. Flow control
  3. Congestion avoidance
  4. Establish connection
  1. Comparing TCP to UDP: choose ALL CORRECT statements
  1. UDP server can support multiple clients using one socket.
  2. TCP server can support multiple clients using one socket.
  3. TCP server can support multiple clients using multiple sockets.
  4. TCP server cannot allow a client to have more than one connection socket.
  5. TCP server allow a client to have more than one connection socket
  1. What is NOT true about TCP congestion control?
  1. TCP sender’s experience slow rate at the beginning of the connection
  2. After a slow start, TCP sender’s initial rate increases slowly
  3. After a slow start, TCP sender’s initial rate increases exponentially (fast)
  4. when loss occurs, congestion window is cut down to half
  1. A reliable data transfer mechanism in which receiver individually acknowledges all correctly received packets and sender only resends packets for which ACK not received is called:
  1. Go-back-N
  2. Selective repeat
  3. Negative acknowledgement
  4. NAK-free protocol
  1. Consider a TCP connection between Host A and B. Suppose that the TCP segments traveling from Host A to Host B have source port number x and destination port number y. What are the source and destination port numbers for the segments traveling from Host B to Host A?
  1. source port number x and destination port number x
  2. source port number x and destination port number y
  3. source port number y and destination port number x
  4. source port number y and destination port number y
  5. No enough information
  1. Consider an RDT protocol. To find whether a received packet (at the receiver) contains new data or it is a duplicate, we can use ________________.
  1. Sequence numbers
  2. Acknowledgement
  3. Duplicate Acknowledgement
  4. Timers
  5. Pipelining
  6. Checksum

In: Computer Science

Pycharm Complete the Place class that has the following attributes for place(name, country, priority and visited...

Pycharm

Complete the Place class that has the following attributes for place(name, country, priority and visited status) and the methods:

__init__

__str__

two methods to mark the place as unvisited\visited

Then in complete a list of Place objects in Places_Features class and the following methods.

load_places (from txt file into Place objects in the list)

save_places (from place list into output list)

add_place (add a place in the place list)

input.txt

Lima,Peru,3,n
Auckland,New Zealand,1,v
Rome,Italy,12,n

Can make the main.py give the following output

Output

* Lima in Peru priority 3
* Rome in Italy priority 12
Auckland in New Zealand priority 1
3 places. You still want to visit 2 places

In: Computer Science

Stairs Jumping One day, Jojo takes a vacation to the mountains to get away from the...

Stairs Jumping

One day, Jojo takes a vacation to the mountains to get away from the cities. While climbing the mountain, Jojo came to an area filled with thousands of stairs to get to the top. However, there was a rule in the mountain which stated that Jojo had to jump over the stairs with same height to get to the top of the mountain. Listening to these rules, Jojo wanted to know what is the minimum required height he should jump and the minimum number of jumps to reach the top of the mountain. Note: Jojo is on the first stair and the top of the mountain is on the last stair. Jojo can jump several stairs as long as the difference of the height of the steps does not exceed the height of Jojo’s jump.

Format Input:

There are T test cases. Each testcase contains an integer N which represents numbers of stairs that Jojo had to jump. On the next line there are N numbers where each number represents the height of the stair.

Format Output Output:

T line with format “Case # X: Y Z”, where X represents the testcase number, Y represents minimal height Jojo has to jump, and Z represents minimal number of jumps to reach the top of the mountain.

Constraints

• 1 ≤ T ≤ 50

• 2 ≤ N ≤ 10000

• 0 ≤ Ai ≤ 109 , where Ai represents i-th height of the stair. • Ai < Aj for every index i < j

Sample Input (standard input):

2

5

1 2 3 4 5

5

1 2 3 4 6

Sample Output (standard output):

Case #1: 1 4

Case #2: 2 3

Explanation In case 1, Jojo will jump 1 unit high because the biggest difference between adjacent stairs is 1. Then Jojo will jump 4 times to reach the top.

In case 2, Jojo will jump 2 units high because the biggest difference between adjacent stairs is 2 on the 4-th and 5-th stairs. Then Jojo made 3 jumps to reach the top with the following simulation.

• In jump 1, Jojo will jump from stair 1 to 3, because the height difference between the 1st and 3rd stairs is still less equal than 2.

• On jump 2, Jojo will jump from stair 3 to 4, with a height difference of 1. Jojo cannot jump directly to stair 5 because the difference in height exceeds the height of Jojo’s jump.

• On jump 3, Jojo will jump from stair 4 to 5, with a height difference of 2

NOTE: USE C LANGUAGE, DONT USE FUNCTION(RESULT,RETURN),VOID,RECURSIVE, USE BASIC CODE AND CODE IT UNDER int main (){, constraint must be the same

In: Computer Science

def draw_rectangle(height, width, char): """ ------------------------------------------------------- Prints a rectangle of height and width characters using the...

def draw_rectangle(height, width, char):
    """
    -------------------------------------------------------
    Prints a rectangle of height and width characters using
    the char character.
    Use: draw_rectangle(height, width, char)
    -------------------------------------------------------
    Parameters:
        height - number of characters high (int > 0)
        width - number of characters wide (int > 0)
        char - the character to draw with (str, len() == 1)
    Returns:
        None
    ------------------------------------------------------
    """

Enter height in characters: 3

Enter width in characters: 12

Enter the draw character: #

############

############

############

In: Computer Science

Using Matlab Write a function, called digits_function that is able to calculate the number of digits...

Using Matlab

  1. Write a function, called digits_function that is able to calculate the number of digits and the multiplication of the digits. The input of this function is N (entered number) and the outputs are number_digits and sum_digits.

  1. Write a function, called print_Min_function that is able to print the minimum of 3 numbers. The inputs of this function are a, b and c.

  1. Write a function, called prime_function that receives one parameter n, and checks whether the number is prime or not. The input of this function is n and the output is result_prime.

  1. Now after you created the three functions, you have to write a program that can call the above functions according to the user’s choice. Write a menu driven that allows the user to select from the following options

  1. To use the digits function you have to enter 1.
  2. To use the minimum function you have to enter 2.
  3. To use the prime function you have to enter 3.
  4. To Exit the program you have to enter 4.

Once the user select one of the above choices you have to read the value entered by the user and then to call the respective function. If the user entered a number that is not equal to 1 or 2 or 3 or 4, the program should ask the user to re-enter again.

Then, you have to use “input” to enter the values of the variables (inputs of the functions).

For the digits function, you have to enter only positive number. For the minimum function, you have to enter greater than or equal to zero values and for the prime function you have to enter greater than 1 values.

For all of the functions, the program should ask the user to re-enter again if the user entered wrong numbers.

In: Computer Science

Python: I am making a program that prints a circle of random size, random location, with...

Python: I am making a program that prints a circle of random size, random location, with user_inputed (using entry) color, when 'DRAW' button is clicked.

I am stuck on passing variables on the while loop. Please Help

from graphics import*
import sys
import random

from time import sleep

def main():
win = GraphWin ('What Color', 500, 600)
win.setCoords(0, 0, 500, 600)

DB = Rectangle(Point(350, 580), Point(400, 560))
DB.setFill('light Green')
DB.draw(win)

QB = Rectangle(Point(430, 580), Point(480, 560))
QB.setFill('red')
QB.draw(win)

DB_t = Text(Point(375,570),'DRAW')
DB_t.setSize(10)
DB_t.draw(win)

QB_t = Text(Point(455,570),'QUIT')
QB_t.setSize(10)
QB_t.draw(win)
  

Ins_t = Text(Point(125, 570), 'Color for next Circle:')
Ins_t.setSize(10)
Ins_t.draw(win)

E1 = Entry(Point(215, 570), 5)
E1.setFill('white')
E1.draw(win)

size = random.randrange (10,25)
x = random.randrange(5, 495)
y = random.randrange(5, 595)
  
while True:
for i in circle(colors):
if circle(color_ui) == i:
c = Circle(Point(x,y), size)
c.setFill(i)
  
while True:
m = win.checkMouse()
if m:
if 430 < m.getX() < 480 and 560 < m.getY() < 580:
win.close()
if 350 < m.getX() < 400 and 560 < m.getY() < 580:
if E1.getText():
c.draw(win)

def circle(c, E1):
colors = ['red','blue','green','yellow','black','purple','pink']
color_ui = E1.getText
while True:
for i in colors:
if color_ui == i:
return i
colors, color_ui


  

In: Computer Science

/* 1. Fix the CREATE and INSERT statements below to create the SHIPMENT table and insert...

/* 1. Fix the CREATE and INSERT statements below to create the SHIPMENT table and insert its data in DB Fiddle*/


CREATE TABLE SHIPMENT (
ShipmentID Int NOT NULL,
ShipperName Char(35) NOT NULL,
ShipperInvoiceNumber Int NOT NULL
DepartureDate Date NULL,
ArrivalDate Date NULL,
InsuredValue Numeric(12,2) NOT NULL,
CONSTRAINT Shipment_PK PRIMARY KEY (ShipmentID))
);

INSERT INTO SHIPMENT VALUES (1,'ABC Trans-Oceanic', 2008651, '10-Dec-14', '15-Mar-18', 15000.00);
INSERT INTO SHIPMENT VALUES (2,'ABC Trans-Oceanic', 2009012, '10-Jan-18', '20-Mar-18', 12000.00);
INSERT INTO SHIPMENT VALUES (3,'Worldwide', 49100300, '05-May-18', '17-Jun-18', 20000.00)
INSERT INTO SHIPMENT VALUES (4,'International', 399400, '02-Jun-18', '17-Jul-18', 17500.00 );
INSERT INTO SHIPMENT VALUES (5,'Worldwide', 84899440, '10-Jul-18', '28-Jul-18', 25000.00);
INSERT INTO SHIPMENT VALUES (6,'International', 488955, '05-Aug-18', '11-Sep-18', 18000.00);

Now you can work on the following 5 queries:

/* Query 1. Show the shipper, the invoice number and insured value for each shipment. */

/* Query 2. Show the shipper and the number of shipments made by each one. */

/* Query 3. Show the shipper and the number of shipments made by each one but only include shipments with insured values that are 15,000 or over. */

/* Query 4. Show the shipper and the number of shipments made by each one but only include shipments with insured values that are 15,000 or over and only show shippers with 2 or more shipments.*/


/* Query 5. Show the shipper, the number of shipments made by each one and the total insured value for all shipments made by each shipper -- but only include shipments with insured values that are 15,000 or over and only show shippers with 2 or more shipments and only show shippers with a total insured value over 40000. */

In: Computer Science

language is C++ 1. Design a class that manages a Pet Food Company's quarterly summarized activity....

language is C++

1. Design a class that manages a Pet Food Company's quarterly summarized activity. It should contain the following:

( This is all private data )

Company Name - char[40]   //  This is a static member 
Quarter              - char         // This is a static member.  Validate to be 1-4 in the setter method

Division Name - char[40]

BonusBudgetRate - float   - set to 0.02
Total Sales        - float
Total Expenses - float

1a. Create a public method named netIncome() which will return total sales - total expenses as float.

 

2. Create public class methods (Setters and Getters) that load the data values.

3. Do not create getter/setter methods for the BonusBudgetRate item. It can be set in a constructor or initialized to the default value of 0.02. There is no other reference to it.

4. This class needs a header file and a corresponding cpp file.

5. Create a 'driver' program that contains the main() method and includes the header file for PetFoodCompany class.

   In the driver program, create an instance of the object PetFoodCompany. 
   Internally set the Quarter to 1 and the CompanyName to a name of your choosing.
   Display the CompanyName and Quarter values
   Prompt for total sales and total expenses for this object
   Display the result of netIncome(). 

Below is an example:

 
Company Name is myCompanyName
Current Quarter is 1

Enter Total Sales: 1000

Enter Total Expenses: 600
Net Income = 400

The deliverable is a working program (CPPs & H files) and a UML diagram of the this class.

In: Computer Science

1) What operational and organizational impacts must be considered when transitioning from the planning to the...

1) What operational and organizational impacts must be considered when transitioning from the planning to the implementation phase of your project? What else is impacted? Think about operational activities, resources, responsibilities, and dependencies.

In: Computer Science

What is the difference between infrastructure security and premises security? List and describe three categories of...

  1. What is the difference between infrastructure security and premises security?
  2. List and describe three categories of physical threats caused by humans.
  3. What are the two requirements for physical security?

In: Computer Science

State the differences between hardware and software-based encryption. How Wi-Fi Pineapples work?

  1. State the differences between hardware and software-based encryption.
  2. How Wi-Fi Pineapples work?

In: Computer Science

Why backups are important and what factors an organisation should consider for a backup strategy? List...

  1. Why backups are important and what factors an organisation should consider for a backup strategy?
  2. List and describe different types of backup strategies.
  3. What is the difference between incremental and differential backups?
  4. What is data sovereignty?

In: Computer Science