Reference no: EM13698067
Program 1: Write a program that accepts a given number an input from the user and prints prime numbers up to that number.
Program 2: Write at least two test cases to check for errors, e.g., you can check whether the user entered a positive number as an input (up to which prime numbers are to be printed), so if the user enters a negative value, that is an error. This is an example of checking a pre-condition, i.e., before the execution of a method.
You can also check if the numbers output by the program are indeed prime, e.g., if any of the numbers output is divisible by 2, then that is an error. This is an example of checking for a post-condition, i.e., after execution of a method.
Program 3: Introduce intermediate print statements in your program for additional debugging. For example, after the user enters a number, you can print that number and so forth
You need to make well-formed and clean code. You should not copy and paste the code from other source.
Write an interactive prolog program
: Write an interactive Prolog program in which a user enters a positive integer and then displays the power of 2 to that number. For example, if the user enters 4, the program calculates the power 2.
|
How can you minimize the quantization error
: How can you minimize the quantization error - Just a simple and quick answer and please no copy and paste.
|
Nyquist sampling theorem
: The Nyquist Sampling Theorem states that digital sampling of an analog signal must be at least twice the rate of the highest frequency of the analog signal in order to accurately reproduce the original signal at the receiver.
|
What is the lan utilization
: Given a LAN of 1Gbps/sec, and making 15 requests/sec to a link for 1Mbits/request of object size, what is the LAN utilization?
|
Write at least two test cases to check for errors
: Write a program that accepts a given number an input from the user and prints prime numbers up to that number.
|
How could you copy all the files from the current directory
: How could you move all the files that end with an extension *.h in your home directory to the current directory without knowing the full path to the current directory [Hint: use a shortcut for the home directory and current directory.
|
Show each of these specifications using predicates
: For every security breach there is at least one mechanism that can detect that breach if and only if there is a process that has not been compromised
|
Algorithm to compute binomial coefficients
: Analyze the time taken by this algorithm under the unreasonable assumption that the addition C(n-1, k-1) + C(n - 1, k) can be carried out in constant time once both C(n-1, k-1) and C(n - 1, k) have been obtained recursively.
|
Write a program in java that reads a file
: Write a program in Java that reads a file of numbers of type int and outputs all the numbers to another file, but without there being any duplicate numbers.
|