Draw a comparison between the traditional system development methodologies and the agile methodology on the basis of following factors:
1. Project Size
2. People Factor
3. Risk Factors
In: Computer Science
In: Computer Science
What is the relationship between Bluetooth and Wi-Fi? What security challenges do Wi-Fi and Bluetooth technology present for a company?
In: Computer Science
In: Computer Science
What is the maximum number of frames per second (round down to a whole number) that this system can display in 16,777,216 simultaneous colors at a resolution of 1920 x 1080?
In: Computer Science
Working with Python. I had to create a jackalope, with half an image of an antelope and half rabbit. Here is my code:
def animalCollage():
antelope = makePicture(pickAFile())
rabbit = makePicture(pickAFile())
antPixel = getPixels(antelope)
rabPixel = getPixels(rabbit)
for index in range(len(antPixel)/2,len(antPixel)):
newColor = getColor(rabPixel[index])
setColor(antPixel[index], newColor)
writePictureTo(antelope, "C:/Users/janin/OneDrive - Grand Canyon
University/Grand Canyon University/CST-111/Week
6/jackalope.jpg")
jackalope = pickAFile()
show(antelope)
My code worked fine, but my instructor said: "the python code to create the jackalope looks fine except I can't run it because you tried to write the picture out to your hard drive. You need to write the picture out to a pickAFile() location."
I am not sure how to correct this. Can anyone please help?
Thank you
In: Computer Science
First make the changes in P82.cpp and call the new program ex82.cpp. Compile and run the program and make sure it produces the correct results. Here is what you need to do for the exercise:
Overload the % operator such that every time
you use it, it takes two objects of type AltMoney as its arguments
and returns:
a) 5% of the difference between the income and expenditure, if
income is larger than the expenditure
b) -2% if the the expenditure is larger than the income.
c) 0 if the expenditure is the same as income
Note that, by doing this, you are required to overload the
greater than sign (>), the smaller than sign (<), and the ==
sign.
#include<iostream>
#include<cstdlib>
using namespace std;
class AltMoney
{
public:
AltMoney();
AltMoney(int d, int c);
friend AltMoney operator +(AltMoney m1, AltMoney m2);
void display_money();
private:
int dollars;
int cents;
};
void read_money(int& d, int& c);
int main()
{
int d, c;
AltMoney m1, m2, sum;
sum = AltMoney(0, 0);
read_money(d, c);
m1 = AltMoney(d, c);
cout << "The first money is:";
m1.display_money();
read_money(d, c);
m2 = AltMoney(d, c);
cout << "The second money is:";
m2.display_money();
sum = m1 + m2;
cout << "The sum is:";
sum.display_money();
return 0;
}
AltMoney::AltMoney()
{
}
AltMoney::AltMoney(int d, int c)
{
dollars = d;
cents = c;
}
void AltMoney::display_money()
{
cout << "$" << dollars << ".";
if (cents <= 9)
cout << "0"; //to display a 0 on the left for numbers less than 10
cout << cents << endl;
}
AltMoney operator +(AltMoney m1, AltMoney m2)
{
AltMoney temp;
int extra = 0;
temp.cents = m1.cents + m2.cents;
if (temp.cents >= 100) {
temp.cents = temp.cents - 100;
extra = 1;
}
temp.dollars = m1.dollars + m2.dollars + extra;
return temp;
}
void read_money(int& d, int& c)
{
cout << "Enter dollar \n";
cin >> d;
cout << "Enter cents \n";
cin >> c;
if (d < 0 || c < 0)
{
cout << "Invalid dollars and cents, negative values\n";
exit(1);
}
}
In: Computer Science
1. A company that wants to send data over the Internet will use an encryption program to ensure data security. All data will be transmitted as four-digit integers. The application should read a four-digit integer entered by the user and encrypt it as follows: Replace each digit with the remainder of the new value divided by 10 by adding 6 to the digit. Then replace the number in the first digit with the third, and the number in the second digit with the fourth. Print the encrypted integer on the screen. Write a separate application where an encrypted four-digit integer is entered and decrypted (reversing the encryption scheme) and finds the original number.
2. Create a class called Employee that contains three instance variables (First Name (String), Last Name (String), Monthly Salary (double)). Create a constructor that initializes these variables. Define set and get methods for each variable. If the monthly salary is not positive, do not set the salary. Create a separate test class called EmployeeTest that will use the Employee class. By running this class, create two employees (Employee object) and print the annual salary of each employee (object). Then set the new salary by giving each employee a 10% raise and display each employee's annual salary on the screen again.
Note: code should be written in Java language.
In: Computer Science
Q.3 Consider the function f(x) = x^2– 2x + 4 on the interval [-2, 2] with h = 0.25. Write the MATLAB function file to find the first derivatives in the entire interval by all three methods i.e., forward, backward, and centered finite difference approximations.
In: Computer Science
Discuss the Minimum System Requirements for Windows
In: Computer Science
Using Ubuntu SeedLab
For block ciphers, when the size of a plaintext is not a multiple of the block size, padding may be required. All the block ciphers normally use PKCS#5 padding, which is known as standard block padding. We will conduct the following experiments to understand how this type of padding works:
1. Use ECB, CBC, CFB, and OFB modes to encrypt a file (you can pick any cipher). Please report which modes have paddings and which ones do not. For those that do not need paddings, please explain why.
2. Let us create three files, which contain 5 bytes, 10 bytes, and 16 bytes, respectively. We can use the following "echo -n" command to create such files. The following example creates a file f1.txt with length 5 (without the -n option, the length will be 6, because a newline character will be added by echo): $ echo -n "12345" > f1.txt
We then use "openssl enc -aes-128-cbc -e" to encrypt these three files using 128-bit AES with CBC mode. Please describe the size of the encrypted files.
We would like to see what is added to the padding during the encryption. To achieve this goal, we will decrypt these files using "openssl enc -aes-128-cbc -d". Unfortunately, decryption by default will automatically remove the padding, making it impossible for us to see the padding. However, the command does have an option called "-nopad", which disables the padding, i.e., during the decryption, the command will not remove the padded data. Therefore, by looking at the decrypted data, we can see what data are used in the padding. Please use this technique to figure out what paddings are added to the three files.
It should be noted that padding data may not be printable, so you need to use a hex tool to display the content. The following example shows how to display a file in the hex format:
$ hexdump -C p1.txt 00000000 31 32 33 34 35 36 37 38 39 49 4a 4b 4c 0a |123456789IJKL.
$ xxd p1.txt 00000000: 3132 3334 3536 3738 3949 4a4b 4c0a
123456789IJKL.
In: Computer Science
(C++)Heapsort: Write C++ codes for heapsort. The input array is a random permutation of A={1,
2, 3, …, 99, 100}. You should write codes to generate and print the random permutation first.
In: Computer Science
Python3 Please add comments
Write a program that implements the word guessing game
- There is a secret word
- The user enters letters one at a time, if the letter appears in the secret word, it is revealed. Otherwise, it counts as a wrong guess.
If the user reveals all the letters in the word before getting too many wrong guesses then they win!
Otherwise, they lose.
1 - define secret word
2 - create a revealed letter list that starts empty
2. set wrong guess count to 0
3. ask the user for a letter
4. is the letter in the secret word?
5. if so: add it to the revealed letters list
create a blank string
for each letter in the secret word, if the letter in
revealed letter list, add that letter to string,
otherwise add an underscore to string
6. if letter not in secret word, add one to wrong guess
7. repeat from step 3
In: Computer Science
Hello, I need to convert this java array into an array list as I am having trouble please.
import java.util.Random;
import java.util.Scanner;
public class TestCode {
public static void main(String[] args) {
String choice = "Yes";
Random random = new Random();
Scanner scanner = new Scanner(System.in);
int[] data = new int[1000];
int count = 0;
while (!choice.equals("No")) {
int randomInt = 2 * (random.nextInt(5) + 1);
System.out.println(randomInt);
data[count++] = randomInt;
System.out.print("Want another random number (Yes / No)? ");
choice = scanner.next();
}
int min = data[0], max = data[0];
for (int i = 0; i < count; i++) {
if (data[i] > max) max = data[i];
if (data[i] < min) min = data[i];
}
System.out.println("Percentage of Yes values is " + (((count-1)*100.0)/count));
System.out.println("Maximum value is " + max);
System.out.println("Minimum value is " + min);
}
}In: Computer Science
C
Implement the function Append (char** s1, char** s2) that appends the second character array to the first, replaces the first array with the result and replaces the second character array with the original first array. For example, if the first character array is "hello" and the second is "world" at the end of the function the new value of the first character array should be"helloworld" and the second array should be "hello". If the input is invalid the function should return 1. Otherwise, the function should return 0.
Input is double pointer (**). No use of <string.h>, USE malloc
#include <stdlib.h>
#include <stdio.h>
int
Append(char **s1, char **s2){
//implement
}
int main(){
char myArray1[7] = "hello";
char myArray2[10] = "world";
char *myArray3 = myArray1;
char *myArray4 = myArray2;
Append(&myArray3, &myArray4);
return 0;
}
In: Computer Science