I have defined the class. Rectangle in Python. How do I define a class Canvas with the following description:
Class Canvas represents a collection of Rectangles. It has 8
methods. In addition, to the constructor
(i.e. __init__ method) and two methods that override python's
object methods (and make your class
user friendly as suggested by the test cases), your class should
contain 5 more methods:
add_one_rectangle, count_same_color, total_perimeter,
min_enclosing_rectangle, and common_point.
In: Computer Science
In programming, we are always assigning one variable to another. With the use of primitive data types that is not a problem. With classes, the program needs to know how to do the assignment. Explain the concepts of deep copy and member wise assignment.
No duplicate answers please. C++ language
In: Computer Science
Computer Networks – Basic Connections
a. Terminal/microcomputer-to-mainframe computer connections
b. Microcomputer-to-local area network connections
c. Microcomputer-to-Internet connections
d. Local area network-to-local area network connections
e. Personal area network-to-workstation connections
f. Local area network-to-metropolitan area network
connections
g. Local area network-to-wide area network connections
h. Wide area network-to-wide area network connections
i. IOT sensor-to-local area network connections
j. Satellite and microwave connections
k. Wireless telephone connections
List which of the eleven network connections listed above most likely involve a connection to the Internet
In: Computer Science
Discuss the main characteristics (at least 2-3) of the database approach and how it differs from traditional file systems. (5 pts) Give examples of systems in which it may make sense to use traditional file processing instead of a database approach. (these examples may come from your day-to-day use of technology)
In: Computer Science
i. Use command ifconfig to find out the IP address of Metasplotiable and record it as your target_IP.
ii. Open a terminal on Kali and try to login to Metasploitable using the command: ssh root@[target_IP]. Can you log in to the System without providing the password?
iii. Use command nmap to scan all TCP ports on our target machine.
iv. Exploitation: a. Open a terminal on Kali and create a new key pair using ssh-keygen. b. Check if you can mount the target system. c. Mount your target system (Metasploitable) to the NFS. d. Copy the newly generated public key into the target system. e. Dismount the target system.
v. Try to login to the target system without password again.
vi. After login to the target system, do the commands below: whoami hostname date echo “Your name”
In: Computer Science
C++
Using what you know about how to take inputs and make outputs to
the console, create a check printing application. Your application
will read in from the user an employee's name and salary, and print
out a Console Check similar to the following.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> | $1,000,000 | >
> >
> ___Pay to the Order of___ Johnny PayCheck >
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
In: Computer Science
Write a factorial C++ program where n=10,000,000
In: Computer Science
Write a class file called lastname_digits.java. In it, write a method to compute and return the total instances where the sum of digits of the array equals to the target.
Write a demo file called lastname_digits_demo.java. Create an array of random 10 integers between 301 and 999. Also create an integer variable called target that is equal to a value between 5 and 10. Print the answer within this file.
Example:
If five of the 20 integers are equal to 512, 607, 620, 767, 791 and the target is 8. Sum of the four integers is equal to 5+1+2 = 8, 13, 8, 20, 17. Then the total instances where the sum of digits of the array equals to the target is equal to 2.
In: Computer Science
Part One: Write a program to draw a repetitive pattern or outline of a shape using for loops and Turtle Graphics. Use the following guidelines to write your program.
Insert your pseudocode here:
Part Two: Code the program. Use the following guidelines to code your program.
In: Computer Science
Write a “C” program(Linux) that creates a pipe and forks a child process. The parent then sends the following message on his side of the pipe “I am your daddy! and my name is <pid-of the-parent-process>\n”, the child receives this message and prints it to its stdout verbatim. The parent then blocks reading on the pipe from the child. The child writes back to its parent through its side ofthe pipe stating “Daddy, my name is <pid-of-the-child>”. The parent then writes the message received from the child to its stdout. Make sure the parent waits on the child exit as to not creating orphans or zombies. Include Makefile.
In: Computer Science
1 of 10
When declaring a jagged array, all dimensions must have the same type.
True | |
False |
Question
2 of 10
What is the maximum number of dimensions you can declare for an array in C#?
3 | |
10 | |
5 | |
There is no maximum. |
Question
3 of 10
When you declare a two-dimensional array, you place two numbers within square brackets. What does the first number represent?
Class | |
Index | |
Column | |
Row |
Question
4 of 10
When declaring a multidimensional array, all dimensions must have the same type.
True | |
False |
Question
5 of 10
Given the code below, the variables "student1" and "student2" refer to the same memory location.
string student1 = "Student";
string student2 = "Student";
True | |
False |
Question
6 of 10
The code below declares a jagged array.
int[][] jaggedArray = new int[2][];
jaggedArray[0] = new int[20];
jaggedArray[1] = new int[10];
int[0,10] = 95; | |
int[0][10] = 95; | |
int[1,11] = 95; | |
int[1][11] = 95; |
Question
7 of 10
Given the code below, what is the output?
string student = " Student";
Console.WriteLine(student.Length)
7 | |
Run-time exception | |
Compile-time exception | |
8 |
Question
8 of 10
Given the code below, what is the output?
string student1 = "Student";
string student2 = "Student";
if(student1 == student2)
{
Console.WriteLine("True");
}
else
{
Console.WriteLine("False");
}
True | |
False |
Question
9 of 10
Select the output for the statement below.
int[,] examArray = new int[30, 6];
Console.WriteLine(examArray.GetLength(2));
A compilation error generates. | |
A run-time error generates. | |
6 | |
30 |
Question
10 of 10
You can use multidimensional arrays to store a different number of columns for certain rows.
True | |
False |
In: Computer Science
WAREHOUSE (WarehouseID, WarehouseCity, WarehouseState, Manager, Squarefeet)
INVENTORY (WarehouseID, SKU, SKU_Description, QuantityOnHand, QuantityOnOrder)
All for MYSQL Database
In: Computer Science
Convert the following decimal numbers to 32-bit IEEE floating point: 86.59375 -1.59729
Convert the following 32-bit IEEE floating point numbers to decimal:
0100 1100 1110 0110
1111 1000 0000 0000
1011 0101 1110 0110 1010 0110 0000 0000
In: Computer Science
Question 1: What are the requirements when choosing an identifier for a C# class?
Question 2: What are the types of comments supported by C#?
In: Computer Science
Discuss system hardening strategies and techniques including updates and patches, default logon/passwords, anonymous access, removal of unneeded services, separation of production and development environments, and settings such as password length and complexity by answering the following questions:
What hardening guidelines or standards are you familiar
with?
What steps have you taken to harden systems?
What function do each of the strategies discussed serve?
Research and provide a web link to an article regarding system
hardening practices.
In: Computer Science