C# Programming
In C# .NET you can build 3 different kinds of Presentation Layers. List them.
In: Computer Science
(3) Briefly (in just a few words), describe the difference between
an instance and a class.
In: Computer Science
Define a function replaceCharAtPos(orig,pos) which receives two input parameters, a string (orig) and a positive integer number (pos).
If the number is a position within the string, the function should
return a new string. The new string should be the original
string except that instead of the original character in that
position pos, it should have the position number itself (if the
position number has more than 1 digit, the character should be
replaced by the digit in the units part of the position number,
e.g. 2 if the position number is 12).
If the number pos is not a valid position within the original
string orig, the string returned should be exactly the same as the
original string.
For example
replaceCharAtPos('abcd',1) should return 'a1cd'
replaceCharAtPos('abcd',10) should return 'abcd'
replaceCharAtPos('abcdefghijklmn',12) should return
'abcdefghijkl2n'
As an example, the following code fragment:
print (replaceCharAtPos("abcd",2))
should produce the output:
ab2d
language: Python
In: Computer Science
(a) Why can't records use private data members (instead of public).
(b) Why shouldn't objects use public data members?
In: Computer Science
ITSC 1212 – Programming Checkpoint 3 – Candle Shop
The main idea behind this activity is to create a program that accepts multiple inputs from a user and use that information to control the operation of the method.
Preliminaries
The owner of a candle shop has asked for your help. The shop sells three types of candles as shown below:
|
Type |
Price |
Burn Time (hours) |
|
1 |
$2.50 |
5 |
|
2 |
$3.75 |
7 |
|
3 |
$5.99 |
12 |
The owner wants you to write a program to perform certain calculations when customers buy different numbers of the candles.
Part A – Develop an algorithm (5 points)
Develop an algorithm to satisfy the following requirements:
Write the pseudocode for the algorithm and store it in a file (file format can be text, pdf or doc) with the name CandleShopSteps.
Part B – Write the code (20 points)
Once you've written your algorithm it is time to turn it into a Java program. that can be executed (run). Here are some things to keep in mind:
In: Computer Science
How do we know the Public Key for a person is turly theirs?
|
A. |
It decrypts by private key |
|
|
B. |
It is verified by a Digital Certificate issued by a trusted CA |
|
|
C. |
The product of the two keys is the original large prime |
|
|
D. |
All of these |
Which of these is true of a public key cipher?
|
A. |
AES is the current algorithm |
|
|
B. |
Any number of people can send someone an encrypted message with Public Key, and they can decrypt it with their private key |
|
|
C. |
A single key is used for both encryption and decryption |
|
|
D. |
It has been superseded by symmetric key algorithms |
|
|
E. |
It has been superseded by one-time pad algorithms |
Which of theses is a disadvantage of public key cryptography relative to symmetric key cryptography?
|
A. |
They require two keys instead of just one |
|
|
B. |
They are slower |
|
|
C. |
They require larger keys to be secure |
|
|
D. |
All of these |
What bad cryptographic practice got the Soviet Union in trouble during the Cold War?
|
A. |
Re-using one time cryptographic pads |
|
|
B. |
Using Outdate cryptographic systems |
|
|
C. |
None of these |
|
|
D. |
Lack of awareness of spies being under surveillance. |
Which of these is the current reccomended symmetric cryptography algorithm?
|
A. |
None of these |
|
|
B. |
Caesar |
|
|
C. |
DES |
|
|
D. |
RSA |
In: Computer Science
Type a 2-3-page paper discussing your opinion on whether you believe organizations should implement SEIMs on their networks.
In: Computer Science
Square-Root Implementation & Performance Comparisons Square root operation is considered difficult to implement in hardware, in this project, you must Write and test a MIPS assembly language program to implement three algorithms of an 8-bit integer square root. Background: In mathematics, a square root (√) of a number x is a number r such that r 2 = x, or, in other words, a number r whose square (the result of multiplying the number by itself, or r × r) is x. Some of the algorithms for calculating square roots of a positive Integer number N are shown below:
1. Newton Raphson Method The Newton Raphson method was first used in Gray
2. Iterative method starts with an initial (guess) value and improves accuracy of the result with each iteration. Assuming that X the original number the iterative equations for calculating the reciprocal of it's square root is: Yi+1 = Yi (3 – X (Yi)^2) Once Y has been calculated, one can get the square root by multiplying with X. This algorithm has quadratic convergence. In each iteration multiplications and additions or subtractions are needed. In order to speed up the multiplier, there must be a special a algorithm such as Wallace tree to get the partial production and use a carry propagate adder to get the production, because the multiplier requires a rather large number of gates counts, it is not so practical to place many multipliers on FPGA. Also it is hard to get an exact remainder of the square root.
3-The Radix-2 SRT-Redundant and Non-Redundant Algorithm The Radix-2 SRT-Redundant and Non-Redundant method are similar. Since them both based on recursive relation. In each iteration, they will be one digit shift left and addition. The determination of a function is rather complex, especially for high radix SRT algorithm. The implantations are not capable of accepting a square root on every clock cycle. Also notice that these two methods may generate a wrong resulting value at the last digit position.
4- The Non-Restoring Algorithm The operation at each iteration is simple: addition or subtraction based on the result bit generated in previous iteration. The remainder of the addition or subtraction is fed via registers to the next iteration directly even it is negative. At the last iteration, if the remainder is non-negative, it is a precise remainder. Otherwise, we can obtain a precise remainder by an addition operation.
In: Computer Science
You have to perform the following tasks:
1- Write the name of best string matching algorithm in terms of time and space complexity.
2- Implement it in (c or c++)
3- Dry run it on following strings:
- String A=aaabaaaabbaaabcaaabd
- String B=aaabd
Deliverable in PDF file:
Code + Dry run + Code execution results using the above given strings.
In: Computer Science
Research the internet for an example of a violation of sensitive information (data breach). Post a summary of the situation and outcome (as well as the source) and evaluate if controls were adequate to prevent the violation. What would you have done to protect the organization from this type of exposure in the future?
In: Computer Science
Hello, need this answered. thanks
In IDS, what is the difference between anomaly based monitoring and signature based monitoring?
In: Computer Science
Hi I'm trying to use a for loop in Matlab to run over the times inside a vector. For example N = [10 20 30], the for loop should run the first number of the loop 10 times once and then the same loop again 20 times and so on. So the program must run the loop 3 times but with the different numbers of the vector.
In: Computer Science
1.Which one of the following statements about refinement and abstraction is TRUE?
Select one:
Abstraction and refinement are the same.
The process of describing more detail about how an instruction
should be carried out is called abstraction.
Abstraction is the hiding of details that are not currently important.
Stepwise refinement is only possible with algorithms and not pseudocode.
Lower level details of how an abstracted algorithm is carried out never have to be written.
2.
What is the data type of the expression ’True’ ?:
Select one:
floating point
floating point
boolean
string
list
3.Which one of the following about data is FALSE?
Select one:
Data can only be in the form of strings.
Data is information.
Computer programs need data to do anything useful.
All input and output is data.
At a low enough level of abstraction, all data is numbers.
In: Computer Science
1, In the vector space models, you can use concepts or terms as basic vectors. Describe the advantages and disadvantages of these two types of vectors with respect to each other.
2. Consider following two words: {precision, precise}. Shall we cluster them together if we set-up the similarity threshold to be 0.5? Please justify your answer. (Hint: use the dice coefficient to compute the similarity.)
In: Computer Science
Write program numsODD that uses the
method to create arrays of odd nums starting 1 of the given length:
public static int[] getnumsOdd(int length) {}
int[] numbers = getnumsOdd(5);
System.out.println(Arrays.toString(numbers));
output:
[1, 3, 5, 7, 9]
In: Computer Science