In JAVA
Create a simple guessing game, similar to Hangman, in which the user guesses letters and then attempts to guess a partially hidden phrase. Display a phrase in which some of the letters are replaced by asterisks: for example, G* T*** (for Go Team). Each time the user guesses a letter, either place the letter in the correct spot (or spots) in the phrase and display it again or tell the user the guessed letter is not in the phrase. Display a congratulatory message when the entire correct phrase has been deduced. Add to this the ability for the user to guess the entire phrase. Save the game as SecretPhrase.java.
Add to this an array of 10 phrases to choose from. Generate a random number to use to select one of the phrases from your array.
Also, add a second array to the the alphabet. As the user guesses a letter mark this letter in the alphabet array as used. When the user attempts to use a letter that was already used, tell them that letter was already user to please guess another letter.
Make the game loop so after a round the user can choose to play again and a different phrase will be chosen.
In: Computer Science
When is an ECPA relevant? Computer forensics
In: Computer Science
Describe a hypothetical scenario where someone would act in ways that are not legal, but it is ethical.
Describe a hypothetical scenario where someone would act in ways that are legal, but not ethical.
(150 Words for each case)
In: Computer Science
Design an O(n log n) algorithm that takes two arrays A and B (not necessarily sorted) of size n of real numbers and a value v. The algorithm returns i and j if there exist i and j such that A[i] + B[j] = v and no otherwise. Describe your algorithm in English and give its time analysis.
In: Computer Science
What properties would make a buffer overflow condition in a program exploitable or useful to an attacker?
In: Computer Science
PYTHON
def find_treasure(mapfile):
with open (mapfile, 'r') as f:
data = f.readlines()
for i, row in enumerate(data):
for j, column in enumerate(row):
if 'S' in column:
print((i,j))
return (i,j)
#This is what mapfile contains
#AAASAAA
#AASSSAA
#AAASAAA
#Need to find the coordinate of the middle S
In: Computer Science
Develop a function to read a document in the MongoDB database
“city” in the collection “inspections.” Be sure it can handle error
conditions gracefully.
a. Input -> arguments to function should be the key/value lookup
pair to use with the MongoDB driver find API call
b. return -> result in JSON format if successful else MongoDB
returned error message
In: Computer Science
(1) Discuss the rules involving actual parameter lists, including matching data types and a one-to-one correspondence with the formal parameter list. Note that the parameter list can be empty, but the function call will still require parentheses after the function name.
(2) Discuss scope rules with respect to global and local identifiers, nested blocks, and functions.
(3) Discuss how local declarations are stored in computer memory. Are there any reasons to avoid using local declarations if it is possible to achieve the same result without them?
In: Computer Science
Define a class to represent a Temperature. Your class should contain
In: Computer Science
QUESTION 38
The ITEM table contains these columns:
COST NUBMER(7,2)
RETAIL NUMBER(7,2)
The RETAIL and COST columns must have a value that is greater than
zero.
Evaluate these two SQL Statements:
1. SELECT retail – cost * 1.25 * .10
FROM item;
2. SELECT (retail – (cost *1.25 )*.10)
FROM item;
What will be the results?
|
Statement 1 will return a low value than statement 2. |
||
|
Statement 1 and statement 2 will return the same values. |
||
|
Statement 1 will return a higher value than statement 2. |
||
|
Only one of the statements will execute. |
2.5 points
QUESTION 39
Using a second SELECT query in the same overall query is a
|
subquery |
||
|
join query |
||
|
cross join |
||
|
aggregate function |
2.5 points
QUESTION 40
select SAL from EMP where SAL between 1000 and 10000; results in (table rows are 1 to 10099)
|
rows 1001 to 9999 returned |
||
|
rows 1 to 10001 returned |
||
|
rows 1001 to 10000 returned |
||
|
rows 1000 to 10000 returned |
In: Computer Science
Create a console app c#. Using a List, ask the user to enter all of their favorite things. Once they
are done, randomly pick a value from the list and display it.
In: Computer Science
QUESTION 26
For more efficient SQL, replace a series of OR clauses with
|
IN |
||
|
AND |
||
|
NULL |
||
|
DISTINCT |
2.5 points
QUESTION 27
SELECT ADD_MONTHS('01-FEB_2016', 3) from dual; results in
|
04-FEB-2016 |
||
|
01-MAY-2016 |
||
|
31-MAY-2016 |
||
|
04-MAY-2016 |
2.5 points
QUESTION 28
joining a table to itself is refered to as
|
an equijoin |
||
|
a self join |
||
|
an outer join |
||
|
a non equi-join |
2.5 points
QUESTION 29
SELECT MIN(NAME) from Customer; will return which of the following rows
|
ALICE |
||
|
WILLIAM |
||
|
BLAKE |
||
|
JAMAL |
2.5 points
QUESTION 30
To obtain all the rows from two tables regardless of matches which join should be used
|
RIGHT OUTER |
||
|
LEFT OUTER |
||
|
EQUIJOIN |
||
|
FULL OUTER |
2.5 points
QUESTION 31
To sort data returned from a SQL statement, which clause should be used
|
ORDER BY |
||
|
WHERE |
||
|
GROUP BY |
||
|
HAVING |
Its a multiple question answer.I donot have any more database
In: Computer Science
Hacktivism is the use of hacking to promote a political cause. Is there an ethical justification for such hacking?
Should penalties for 'hacktivists' differ from penalties for other hackers?
In: Computer Science
Seminar on Oct 5: Operating Systems
1. List one or more
A. Stand-alone operating system
B. Network operating system
C. Embedded operating system
D. Possible applications of embedded system
E. Open-source operating system
F. Single-tasking operating system
G. Operating system based on Unix/Linux
H. Multitasking operating system
I. Multithreading operating system
J. Mobile-device operating system
2. What is:
(a) boot sector
(b) bootstrap loader
(c) partition
In: Computer Science
What are the additional elements required of a network architecture if the enclave is to support remote access through the public Internet?
True or false: A thin client is a PC or laptop without a hard drive or storage space.
What are the five elements of a Remote Access Security Readiness Review
In: Computer Science