1) Imagine you are the owner of an e-commerce Web site.
a. What are some of the signs that your site has been hacked?
b. Discuss the major types of attacks you could expect and the resulting damage to your site.
2) Given the shift toward mobile commerce,
a. do a search on mobile commerce crime.
b. Identify and discuss in one page the new security threats this type of technology creates.
In: Computer Science
Write a JavaFx program for addition of two numbers. (create text as Number1, Number2 and Result and create 3 textfileds. Create sum button. You have to enter number1 and number2 in the textfileds. If you click the button Sum, the result will be showed in the third text field.
In: Computer Science
write a java code to implement a linked list, called CupList, to hold a list of Cups.
1.Define and write a Cup node class, called CupNode, to hold the following information about a cup:
•number (cup number)
•capacity (cup capacity in ml)
•Write a method size() that returns the number of elements in the linkedlist CupList.
•Write a method getNodeAt() that returns the reference to cup node object at a specific position given as a parameter of the method.
•Write a method, insertPos(), to insert a new CupNode object at a specific position given as a parameter of the method.
•Write a method, deletePos(), to remove the CupNode object at a specific position given as a parameter of the method.
•Write a method, swapNodes, to swap two nodes at two positions pos1 and pos2 given as parameters of the method.
Implement the Cup list using double linked list.
•Update CupNode class by adding a link to the previous node in the list. Then update the constructor of the class
•Update the CupList by adding a last attribute, to hold the reference to the last node of the list.
•Implement the following methods in CupList isEmpty(), size(), insertAtFront(), insertAtRear(), insertAt(), removeFirst(), removeLast(), removeAt().
CupNode should have a constructor and methods to manage the above information as well as the link to next node in the list.
2.Define and write the CupList class to hold objects of the class CupNode. This class should define:
a)a constructor,
b)a method isEmpty() to check if the list is empty or not,
c)a method insert() that will allow to insert a new cup node at the end of the list,
d)a method print() that will allow to print the content of the list,
e)A method getCupCapacity() that will return the capacity of a cup given its number. The method should first find out if a cup with that number is in the list.
3.Write a TestCupList class to test the class CupList. This class should have a main method in which you perform the following actions :
a)Create a CupList object,
b)Insert five to six CupNode objects into the created Cup List,
c)Print the content of your cup list,
d)Search for a given cup number in the list and print out its capacity.
In: Computer Science
Write a Python program to simulate a very simple game of
21
•Greet the user.
•Deal the user a card and display the card with an appropriate
message.
•Deal the user another card and display the card
.•Ask the user if they would like a third card. If so, deal them
another card and display the value with an appropriate
message.
•Generate a random number between 10 and 21 representing the
dealer’s hand. Display this value with an appropriate
message.
•If the user’s total is greater than the dealer’s hand and the
user’s total is NOT greater than 21, the user wins, otherwise the
dealer wins. Display the player’s and the dealer’s totals along
with an appropriate message indicating who won.
In: Computer Science
•From the e-Activity, determine what you believe is the most critical component of BCP from FEMA’s implementation / suggestions for the BCP process. Justify your answer. •Determine whether or not you believe the BCP process would be successful without proper BIA processes being conducted. Explain why or why not
In: Computer Science
Describe your opinion of why some collaborative interfaces, such as email, are much more popular than others, such as video-conferencing. Compare and contrast your method with at least two of your peers' responses.
In: Computer Science
Write C++ statements that will align the following three lines as printed in two 20 character columns.
Item Price
Banana Split 8.90
Ice Cream Cake 12.99
In: Computer Science
CSIS 113A C++ Programming Level1
Rock, Paper, Scissors
Introduction
In this assignment you will create a program that will simulate the popular children’s game “Rock, Paper, Scissors”; using only Boolean logic and practice using the for-loop and logical operators as well as continue getting used to data of various types.
Skills: string input/output, data types, logical operators, and control structures
Rock-Paper-Scissors
Rock-Paper-Scissors is a game where two players, on the count of 3, show the rock/paper/scissors symbol with their hand. Rock smashes scissors, scissors cuts paper, and paper covers rock:
Once both players have played valid gestures, there are two ways to determine the winner: one using string comparison and Boolean logic and the other using modular arithmetic; you’ll write a solution using both approaches. For this assignment, only “rock”, “paper”, and “scissors” are considered valid gestures.
Definitions:
1. Valid game: a game in which both players select a valid gesture
2. Invalid game: a game in which a player selects a gesture that is not “rock”, “paper”, or “scissors”. (HINT: DeMorgan’s law will help negation of valid game)
main.cpp
Your program should use a for-loop to play 7 consecutive games (must be a variable) of Rock-PaperScissors determining the winner using only the four decision statements. For each game, your program should:
1) Prompt Player 1 for their selection. The inputs for each game are given below. a. If Player 1 enters an invalid selection you should update the count of invalid games and then begin a new game.
2) Prompt Player 2 for their selection. The inputs for each game are given below.
a) If Player 2 enters an invalid selection you should update the count of invalid games and then begin a new game.
3) If both players have selected a valid gesture determine the winner using string comparison and if/else logic.
4) For each valid game completed, update the count of the number of wins by Player 1, the number of wins by Player 2, or the number of ties as needed.
Test input:
• Game 1: Player one plays “scissors” and Player 2 plays “paper”
• Game 2: Player 1 plays “paper” and Player 2 plays “papers”
• Game 3: Player 1 plays “rock” and Player 2 plays “rock”
• Game 4: Player 1 plays “rocks”
• Game 5: Player 1 play “paper” and Player 2 plays “scissors”
• Game 6: Player 1 plays” scissors” and Player 2 plays “rock”
• Game 7: “Player 1 plays “paper” and Player 2 plays “rock”
Test Run: Your code should look exactly like the one below
Player 1 Enter Selection: scissors
Player 2 Enter Selection: paper
Player 1 Enter Selection: paper
Player 2 Enter Selection: papers
Player 1 Enter Selection: rock
Player 2 Enter Selection: rock
Player 1 Enter Selection: rocks
Player 1 Enter Selection: paper
Player 2 Enter Selection: scissors
Player 1 Enter Selection: scissors
Player 2 Enter Selection: rock
Player 1 Enter Selection: paper
Player 2Enter Selection: rock
=============================
Games Won
=============================
Player 1: 2
Player 2: 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tie Games : 1
Invalid Games : 2
=============================
struct Player{ String gesture; int wins{}; }; int main() { // TODO: (1) declare constant for the number of games to play // TOOO: (2) declare and initailize your other counters here (number of ties, invalid games) Player player_1; Player player_2; // TODO: (12) wrap in for-loop once working for 1 game. // TODO: (3) get user input for player 1, commented out correct code for now, simulating with rock first player_1.gesture = "rock"; // cout << "Player 1 enter selection: "; // getlline(cin, player_1.gesture); // TODO: (5) write a boolean proposition here, finish what it should be, notice how the name reads bool gesture_is_rock; bool gesture_is_paper; bool gesture_is_scissors; bool is_valid_gesture; // TDOO: (6) determine if player 1 entered invalid move if (!is_valid_gesture) { // TODO: (7) what should be done if invalid? How do you continue the loop } // TODO: (8) Do the exact same for Player 2 reusing the boolean variables // TODO: (9) Determine if there was a tie, otherwise, there was a win bool is_tied_game; if (is_tied_game) { // TODO: (10) what should be done if tie? } else { // TODO: (11) consider how player one can win: bool player_1_wins; if (player_1_wins) { } else { } } // TODO: (4) Setup the way the output should be displayed based on the document return 0; }
In: Computer Science
In this assignment, you will create a Java program to search recursively for a file in a directory.
• The program must take two command line parameters. First parameter is the folder to search for. The second parameter is the filename to look for, which may only be a partial name.
• If incorrect number of parameters are given, your program should print an error message and show the correct format.
• Your program must search recursively in the given directory for the files whose name contains the given filename. Once a match is found, your program should print the full path of the file, followed by a newline.
• You can implement everything in the main class. You need define a recursive method such as: public static search(File sourceFolder, String filename) For each folder in sourceFolder, you recursively call the method to search.
• A sample run of the program may look like this: //The following command line example searches any file with “Assignment” in its name
%java Assign7.Assignment6
C:\CIS 265 Assignment
C:\CIS 265\AS 2\Assignment2.class C:\CIS 265\AS 2\Assignment2.java C:\CIS 265\AS 3\CIS265\Assignment3.class C:\CIS 265\AS 3\CIS265\Assignment3.java C:\CIS 265\AS 4\Assignment4.gpj
Hi please tell me what to input exactly, thanks
In: Computer Science
Requirements: The company that needed the flowchart and pseudocode for calculating the final price of the TV set and sound bar has given you the responsibility of creating a program for that purpose. The requirements remain the same as those indicated for the flowchart: The program will be used to enter the price of the TV set and the sound bar, in that order. The place of residence will also be entered in order to calculate the sales tax Residents of New Jersey pay 6.625% sales tax Residents of New York City pay 8.875% sales tax. • Residents of New York State (outside New York City) pay 4.375% sales tax The place of residence will be entered as NJ, NYC or NYS After the calculation is performed, the final result will be displayed
In: Computer Science
In Python write a function with prototype “def wordfreq(filename = "somefile.txt"):” that will read a given file that contains words separated by spaces (perhaps multiple words on a line) and will create a dictionary whose keys are the words and the value is the number of times the word appears. Convert each word to lower case before processing.
In: Computer Science
Please solve me this question and send me the video clip how to do it
This problem contains loops, sorting arrays, random generation, and variable matching.
Include an analysis (data requirements) and algorithm in your reply.
Write a “lottery engine” program to simulate drawing lottery numbers. You will draw 7 numbers, randomly selected from 1 to 16.
a) Allow the user to enter their own selection of numbers first,
Example numbers: 2 3 7 9 10 11 15
b) then run your “lottery engine” to select the “winning numbers”. Numbers are drawn randomly.
Use the clock as the seed value for your random function (Hint: use “srand(clock());” ).
c) Be sure to remove duplicate entries.
d) Print out the draw result as it was generated (unsorted), then sort the array and print out the sorted numbers.
Example output:
“
Draw unsorted: 2 12 16 14 7 13 1
Draw sorted: 1 2 7 12 13 14 16
“
e) Then print out the matching numbers selected by the user:
f) Also print the sorted user selection and draw results and matching numbers to a TXT file called “Results.txt”.
Example output
“
Draw sorted: 1 2 7 12 13 14 16
User’s sorted: 2 3 7 9 10 11 15
Matching numbers: 2 – 7
“
In: Computer Science
In: Computer Science
data structures in the banker's algorithm is a vector of length m, where m is the number of resource types
a variant of the resource allocation graph used if all resources have only a single instance
system can allocate resources to each thread in some order and avoid a deadlock
assigned to its own resource
from thread Ti to resource Rj
directed graph used to describe a deadlock
deadlock avoidance algorithm used for resource allocation systems with multiple instances of each resource type
a sequence of thread where resources can be allocated without a deadlock
records whether each resource is free or allocated
from resource to thread
proves a set of methods to ensure that at last one of the necessary conditions cannot hold
indicates that a process may request a resource
requires that the operating system be given addition information in advance concerning which resource a thread will request
used by most operating systems
occurs when a thread continuously attempts an action that fails
========================================
Match Based on the above answers:-
Incidence of a lock
System table
Livelock
Resource allocation graph
Directed edge
Assignment edge
Claim edge
Available
Deadlock prevention
Deadlock avoidance
Do nothing about a deadlock
Safe state
Safe sequence
Baker’s algorithm
Wait-for graph
In: Computer Science
Given an integer named area which represents the area of a rectangle, write a function minPerimeter that calculates the minimum possible perimeter of the given rectangle, and prints the perimeter and the side lengths needed to achieve that minimum. The length of the sides of the rectangle are integer numbers. For example, given the integer area = 30, possible perimeters and side-lengths are: (1, 30), with a perimeter of 62 (2, 15), with a perimeter of 34 (3, 10), with a perimeter of 26 (5, 6), with a perimeter of 22 Thus, your function should print only the last line, since that is the minimum perimeter. Some example outputs:
>>>minPerimeter(30)
22 where rectangle sides are 5 and 6.
In: Computer Science