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) Client
1.4) Object
In: Computer Science
Briefly describe an example scenario where a strategy design pattern is suitable to use.
In: Computer Science
Answer the following multiple-choice questions:
In: Computer Science
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 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 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
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 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 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. 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 implementation phase of your project? What else is impacted? Think about operational activities, resources, responsibilities, and dependencies.
In: Computer Science
In: Computer Science
In: Computer Science
In: Computer Science