Question 1. Pick three security failures of Windows system and explain how you would address them.
In: Computer Science
/* Database Systems, 9th Ed., Coronel/MOrris/Rob */
/* Type of SQL : MySQL */
CREATE SCHEMA IF NOT EXISTS TINY_VIDEO;
USE TINY_VIDEO;
DROP TABLE IF EXISTS detail_rental;
DROP TABLE IF EXISTS rental;
DROP TABLE IF EXISTS membership;
DROP TABLE IF EXISTS video;
DROP TABLE IF EXISTS movie;
DROP TABLE IF EXISTS price;
/*Create table price*/
CREATE TABLE price
(price_id INTEGER PRIMARY KEY AUTO_INCREMENT,
description VARCHAR(20) NOT NULL,
rental_fee DECIMAL(5,2),
daily_late_fee DECIMAL(5,2));
/*Insert data into price*/
INSERT INTO price VALUES(1,'Standard',2.5,1);
INSERT INTO price VALUES(2,'New Release',4.0,3);
INSERT INTO price VALUES(3,'Discount',2.0,1);
INSERT INTO price VALUES(4,'Weekly Special',1.5,.5);
/*Create table movie*/
CREATE TABLE movie
(movie_id INTEGER PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(75) NOT NULL,
year_released INTEGER,
cost DECIMAL(5,2),
genre VARCHAR(50),
price_id INTEGER,
FOREIGN KEY(price_id) REFERENCES price(price_id));
/*Insert data into movie*/
INSERT INTO movie VALUES(1234,'The Cesar Family
Christmas',2007,39.95,'FAMILY',2);
INSERT INTO movie VALUES(1235,'Smokey Mountain
Wildlife',2004,59.95,'ACTION',3);
INSERT INTO movie VALUES(1236,'Richard
Goodhope',2008,59.95,'DRAMA',2);
INSERT INTO movie VALUES(1237,'Beatnik
Fever',2007,29.95,'COMEDY',2);
INSERT INTO movie VALUES(1238,'Constant
Companion',2008,89.95,'DRAMA',NULL);
INSERT INTO movie VALUES(1239,'Where Hope
Dies',1998,25.49,'DRAMA',3);
INSERT INTO movie VALUES(1245,'Time to
Burn',2006,45.49,'ACTION',3);
INSERT INTO movie VALUES(1246,'What He Doesn''t
Know',2006,58.29,'COMEDY',1);
/*Create table video*/
CREATE TABLE video
(video_id INTEGER PRIMARY KEY AUTO_INCREMENT,
purchase_date DATE,
movie_id INTEGER,
FOREIGN KEY(movie_id) REFERENCES movie(movie_id));
/*Insert data into video*/
INSERT INTO video VALUES(54321,'2008-06-18',1234);
INSERT INTO video VALUES(54324,'2008-06-18',1234);
INSERT INTO video VALUES(54325,'2008-06-18',1234);
INSERT INTO video VALUES(34341,'2007-01-22',1235);
INSERT INTO video VALUES(34342,'2007-01-22',1235);
INSERT INTO video VALUES(34366,'2009-03-02',1236);
INSERT INTO video VALUES(34367,'2009-03-02',1236);
INSERT INTO video VALUES(34368,'2009-03-02',1236);
INSERT INTO video VALUES(34369,'2009-03-02',1236);
INSERT INTO video VALUES(44392,'2008-10-21',1237);
INSERT INTO video VALUES(44397,'2008-10-21',1237);
INSERT INTO video VALUES(59237,'2009-02-14',1237);
INSERT INTO video VALUES(61388,'2007-01-25',1239);
INSERT INTO video VALUES(61353,'2006-01-28',1245);
INSERT INTO video VALUES(61354,'2006-01-28',1245);
INSERT INTO video VALUES(61367,'2008-07-30',1246);
INSERT INTO video VALUES(61369,'2008-07-30',1246);
/*Create table membership*/
CREATE TABLE membership
(membership_id INTEGER PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
street VARCHAR(120),
city VARCHAR(50),
state VARCHAR(2),
zip VARCHAR(5),
balance DECIMAL(10,2));
/*Insert data into membership*/
INSERT INTO membership VALUES(102,'Tami','Dawson','2632 Takli
Circle','Norene','TN','37136',11);
INSERT INTO membership VALUES(103,'Curt','Knight','4025 Cornell
Court','Flatgap','KY','41219',6);
INSERT INTO membership VALUES(104,'Jamal','Melendez','788 East
145th Avenue','Quebeck','TN','38579',0);
INSERT INTO membership VALUES(105,'Iva','Mcclain','6045 Musket Ball
Circle','Summit','KY','42783',15);
INSERT INTO membership VALUES(106,'Miranda','Parks','4469 Maxwell
Place','Germantown','TN','38183',0);
INSERT INTO membership VALUES(107,'Rosario','Elliott','7578 Danner
Avenue','Columbia','TN','38402',5);
INSERT INTO membership VALUES(108,'Mattie','Guy','4390 Evergreen
Street','Lily','KY','40740',0);
INSERT INTO membership VALUES(109,'Clint','Ochoa','1711 Elm
Street','Greenville','TN','37745',10);
INSERT INTO membership VALUES(110,'Lewis','Rosales','4524 Southwind
Circle','Counce','TN','38326',0);
INSERT INTO membership VALUES(111,'Stacy','Mann','2789 East Cook
Avenue','Murfreesboro','TN','37132',8);
INSERT INTO membership VALUES(112,'Luis','Trujillo','7267 Melvin
Avenue','Heiskell','TN','37754',3);
INSERT INTO membership VALUES(113,'Minnie','Gonzales','124 6th
Street West','Williston','ND','58801',0);
/*Create table rental*/
CREATE TABLE rental
(rental_id INTEGER PRIMARY KEY AUTO_INCREMENT,
rental_date DATE,
membership_id INTEGER,
FOREIGN KEY(membership_id) REFERENCES
membership(membership_id));
/*Insert data into rental*/
INSERT INTO rental VALUES(1001,'2009-03-01',103);
INSERT INTO rental VALUES(1002,'2009-03-01',105);
INSERT INTO rental VALUES(1003,'2009-03-02',102);
INSERT INTO rental VALUES(1004,'2009-03-02',110);
INSERT INTO rental VALUES(1005,'2009-03-02',111);
INSERT INTO rental VALUES(1006,'2009-03-02',107);
INSERT INTO rental VALUES(1007,'2009-03-02',104);
INSERT INTO rental VALUES(1008,'2009-03-03',105);
INSERT INTO rental VALUES(1009,'2009-03-03',111);
/*Create table detailrental*/
CREATE TABLE detail_rental
(rental_id INTEGER,
video_id INTEGER,
fee DECIMAL(5,2),
due_date DATE,
return_date DATE,
daily_late_fee DECIMAL(5,2),
PRIMARY KEY(rental_id, video_id),
FOREIGN KEY(rental_id) REFERENCES rental(rental_id),
FOREIGN KEY(video_id) REFERENCES video(video_id));
/*Insert data into dailyrental*/
INSERT INTO detail_rental
VALUES(1001,34342,2,'2009-03-04','2009-03-02',1);
INSERT INTO detail_rental
VALUES(1001,61353,2,'2009-03-04','2009-03-03',1);
INSERT INTO detail_rental
VALUES(1002,59237,3.5,'2009-03-04','2009-03-04',3);
INSERT INTO detail_rental
VALUES(1003,54325,3.5,'2009-03-04','2009-03-09',3);
INSERT INTO detail_rental
VALUES(1003,61369,2,'2009-03-06','2009-03-09',1);
INSERT INTO detail_rental
VALUES(1003,61388,0,'2009-03-06','2009-03-09',1);
INSERT INTO detail_rental
VALUES(1004,44392,3.5,'2009-03-05','2009-03-07',3);
INSERT INTO detail_rental
VALUES(1004,34367,3.5,'2009-03-05','2009-03-07',3);
INSERT INTO detail_rental
VALUES(1004,34341,2,'2009-03-07','2009-03-07',1);
INSERT INTO detail_rental
VALUES(1005,34342,2,'2009-03-07','2009-03-05',1);
INSERT INTO detail_rental
VALUES(1005,44397,3.5,'2009-03-05','2009-03-05',3);
INSERT INTO detail_rental
VALUES(1006,34366,3.5,'2009-03-05','2009-03-04',3);
INSERT INTO detail_rental
VALUES(1006,61367,2,'2009-03-07',NULL,1);
INSERT INTO detail_rental
VALUES(1007,34368,3.5,'2009-03-05',NULL,3);
INSERT INTO detail_rental
VALUES(1008,34369,3.5,'2009-03-05','2009-03-05',3);
INSERT INTO detail_rental
VALUES(1009,54324,3.5,'2009-03-05',NULL,3);
INSERT INTO detail_rental
VALUES(1001,34366,3.5,'2009-03-04','2009-03-02',3);
In: Computer Science
The following algorithm is widely used for checking whether a credit or debit card number has been entered correctly on a website. It doesn't guarantee that the credit card number belongs to a valid card, but it rules out numbers which are definitely not valid. Here are the steps:
Example
Here is a worked example using the long number "4916592478445662".
longNumber index | longNumber value at index | values at even indexes multiplied by 2 | Adjusted to a single digit by subtracting 9 |
---|---|---|---|
0 | 4 | 8 | 8 |
1 | 9 | … | 9 |
2 | 1 | 2 | 2 |
3 | 6 | … | 6 |
4 | 5 | 10 | 1 |
5 | 9 | … | 9 |
6 | 2 | 4 | 4 |
7 | 4 | … | 4 |
8 | 7 | 14 | 5 |
9 | 8 | … | 8 |
10 | 4 | 8 | 8 |
11 | 4 | … | 4 |
12 | 5 | 10 | 1 |
13 | 6 | … | 6 |
14 | 6 | 12 | 3 |
S = 8 + 9 + 2 + 6 + 1 + 9 + 4 + 4 + 5 + 8 + 8 + 4 + 1 + 6 + 3 = 78
a- Write a public method called isCorrectLength() that takes no arguments and returns the boolean value true if the length of longNumber is 16 and false otherwise.
b - Write a public method firstFifteen() that returns a String consisting of the first fifteen characters in the longNumber.
c) - write a public method calculateCheckNumber() to find S and then use the expression S/10 * 10 + 10 – S to find C. The method should first create a string omitting the last digit of the longNumber and then find S by iterating through this string. (You may choose to do a separate iteration for the odd and even indexes, or you could do both in a single loop.)
In: Computer Science
COMPLETE JAVA CODE
public class Point2 {
private double x;
private double y;
/**
* Create a point with coordinates <code>(0,
0)</code>.
*/
public Point2() {
complete JAVA code
this.set(0.0, 0.0);
COMPLETE CODE
}
/**
* Create a point with coordinates <code>(newX,
newY)</code>.
*
* @param newX the x-coordinate of the point
* @param newY the y-coordinate of the point
*/
public Point2(double newX, double newY) {
complete Java code
this.set(newX, newY);
}
/**
* Create a point with the same coordinates as
<code>other</code>.
*
* @param other another point
*/
public Point2(Point2 other) {
complete Java code
}
/**
* Returns the x-coordinate of this point.
*
* @return the x-coordinate of this point
*/
public double getX() {
complete Java code
}
/**
* Returns the y-coordinate of this point.
*
* @return the y-coordinate of this point
*/
public double getY() {
complete Java code
return this.y;
}
/**
* Sets the x-coordinate of this point to
<code>newX</code>.
*
* @param newX the new x-coordinate of this point
*/
public void setX(double newX) {
complete Java code
this.x = newX;
}
/**
* Sets the y-coordinate of this point to
<code>newY</code>.
*
* @param newY the new y-coordinate of this point
*/
public void setY(double newY) {
complete Java code
this.y = newY;
}
/**
* Sets the x-coordinate and y-coordinate of this point to
* <code>newX</code> and <code>newY</code>,
respectively.
*
* @param newX the new x-coordinate of this point
* @param newY the new y-coordinate of this point
*/
public void set(double newX, double newY) {
this.x = newX;
this.y = newY;
}
/**
* Adds a vector to this point changing the coordinates of this
point.
*
* <p>
* Mathematically, if this point is <code>a</code> and
the vector is
* <code>v</code> then invoking this method is
equivalent to computing
* <code>a + v</code> and assigning the value back to
<code>a</code>.
*
* @param v a vector
* @return this <code>Point2</code> object
*/
public Point2 add(Vector2 v) {
complete Java code
this.x += v.getX();
this.y += v.getY();
return this;
}
/**
* Returns a new <code>Point2</code> equal to
<code>a - b</code>.
*
* @param a
* a point
* @param b
* another point
* @return a new <code>Point2</code> equal to
<code>a - b</code>
*/
public static Vector2 subtract(Point2 a, Point2 b) {
Vector2 result = new Vector2(a.getX() - b.getX(), a.getY() -
b.getY());
return result;
}
/**
* Returns a string representation of this point. The string
* representation of this point is the x and y-coordinates
* of this point, separated by a comma and space, inside a
pair
* of parentheses.
*
* @return a string representation of this point
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
complete Java code
String s = String.format("(%s, %s)", this.getX(),
this.getY());
return s;
}
/**
* Returns a hash code for this point
*
* @return a hash code for this point
*/
@Override
public int hashCode() {
complete Java code
final int prime = 31;
int result = 1;
long temp;
temp = Double.doubleToLongBits(this.x);
result = prime * result + (int) (temp ^ (temp >>>
32));
temp = Double.doubleToLongBits(this.y);
result = prime * result + (int) (temp ^ (temp >>>
32));
return result;
}
/**
* Compares this point with the given object. The result is
* <code>true</code> if and only if the argument is not
<code>null</code>
* and is a <code>Point2</code> object having the same
coordinates as this
* object.
*
* @param obj
* the object to compare this vector against
* @return <code>true</code> if the given object
represents a
* <code>Point2</code> equivalent to this point,
* <code>false</code> otherwise
*/
@Override
public boolean equals(Object obj) {
complete Java code
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
Point2 other = (Point2) obj;
if (Double.doubleToLongBits(this.x) !=
Double.doubleToLongBits(other.x)) {
return false;
}
if (Double.doubleToLongBits(this.y) !=
Double.doubleToLongBits(other.y)) {
return false;
}
return true;
}
/**
* Determines if two points are almost equal (similar). Two points
are
* similar if the magnitude of their vector difference is smaller
than the
* specified tolerance.
*
* @param other
* the other point to compare
* @param tol
* the threshold length of the vector difference
* <code>(this - other)</code>
* @return <code>true</code> if the length of
<code>(this - other)</code> is
* less than <code>tol</code>, and
<code>false</code> otherwise
*/
public boolean similarTo(Point2 other, double tol) {
Vector2 delta = Point2.subtract(this, other);
return delta.mag() < Math.abs(tol);
}
}
In: Computer Science
In this discussion, you will apply the statistical concepts and techniques covered in this week's reading about correlation coefficient and simple linear regression. A car rental company wants to evaluate the premise that heavier cars are less fuel efficient than lighter cars. In other words, the company expects that fuel efficiency (miles per gallon) and weight of the car (often measured in thousands of pounds) are correlated. Performing this analysis will help the company optimize its business model and charge its customers appropriately.
In this discussion, you will work with a cars data set that includes two variables:
The random sample will be drawn from a CSV file. This data will be unique to you, and therefore your answers will be unique as well. Run Step 1 in the Python script to generate your unique sample data.
In your initial post, address the following items:
<Figure size 640x480 with 1 Axes>
mpg wt mpg 1.000000 -0.863527 wt -0.863527 1.000000
OLS Regression Results ============================================================================== Dep. Variable: mpg R-squared: 0.746 Model: OLS Adj. R-squared: 0.737 Method: Least Squares F-statistic: 82.10 Date: Fri, 02 Oct 2020 Prob (F-statistic): 8.10e-10 Time: 12:39:57 Log-Likelihood: -75.289 No. Observations: 30 AIC: 154.6 Df Residuals: 28 BIC: 157.4 Df Model: 1 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 37.1346 1.960 18.944 0.000 33.119 41.150 wt -5.2638 0.581 -9.061 0.000 -6.454 -4.074 ============================================================================== Omnibus: 2.644 Durbin-Watson: 2.405 Prob(Omnibus): 0.267 Jarque-Bera (JB): 2.104 Skew: 0.643 Prob(JB): 0.349 Kurtosis: 2.832 Cond. No. 12.7 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
In: Computer Science
Question 2. Pick three security failures of Linux system and explain how you would address them.
In: Computer Science
following:
It prints the student’s id and GPA. If the student’s GPA is greater than or equal to 3.8, it prints “an honor student”.
In: Computer Science
Question 3. Pick three security failures of Mac system and explain how you would address them.
In: Computer Science
Using the provided network diagram, write a program in c ++ that finds the shortest path routing using the Bellman-Ford algorithm. Your program should represent the fact that your node is U. Show how the iterative process generates the routing table for your node. One of the keys to your program will be in determining when the iterative process is done.
Deliverables 1. Provide an output that shows the routing table for your node after each iteration. Add a second table with two columns. One that shows the destination from your node and the second column indicating the number of hops to reach that node. 2. Provide a Word document that explains how your program incorporates the Bellman-Ford algorithm. Ensure you explain how you incorporated the iterative process and determined when the routing table for your node was optimum. You can incorporate your outputs into this document; however, you must identify where in your source code you print the results. 3. Provide a copy of your source code
In: Computer Science
Question 5. Irrespective of what the system is, what are the top three practices/habits you would follow to secure your server? Please explain.
In: Computer Science
***Define a class called Pizza that has member variables to track the type of pizza (either deep dish, hand tossed, or pan) along with the size (either small, medium, or large) and the number of pepperoni or cheese toppings. You can use constants to represent the type and size. Include mutator and accessor functions for your class. Create a void function, outputDescription( ) , that outputs a textual description of the pizza object. Also include a function, computePrice( ) , that computes the cost of the pizza and returns it as a double according to the following rules: Small pizza = $10 + $2 per topping Medium pizza = $14 + $2 per topping Large pizza = $17 + $2 per topping Write a suitable test program that creates and outputs a description and price of various pizza objects.*** I HAVE THE CODE FOR THIS QUESTION, I NEED HELP WITH:
⦁ This Programming Project requires you to first complete Programming Project 7 from Chapter 5, which is an implementation of a Pizza class. Add an Order class that contains a private vector of type Pizza. This class represents a customer’s entire order, where the order may consist of multiple pizzas. Include appropriate functions so that a user of the Order class can add pizzas to the order (type is deep dish, hand tossed, or pan; size is small, medium, or large; number of pepperoni or cheese toppings). Data members: type and size. Also write a function that outputs everything in the order along with the total price. Write a suitable test program that adds multiple pizzas to an order(s).
In: Computer Science
A) csc 401 c++
Write a class CorpData to store the following information on a company division:
a. Division name (such as East, West, North, or South)
b. First quarter sales c. Second quarter sales d. Third quarter sales e. Fourth quarter sales Include a constructor that allows the division name and four quarterly sales amounts to be specified at the time a CorpData object is created. The program should create four CorpData objects, each representing one of the following corporate divisions: East, West, North, and South. These objects should be passed one at a time, to a function that computes the division's annual sales total and quarterly average, and displays these along with the division name.
In: Computer Science
analyze cyclic redundancy check CRC using the following subheading
i. concept explanation
ii. method used for implementing CRC
iii. Illustration of each method
iv. merits and demerits in relation to performance
In: Computer Science
Language C: Suppose you are given a file containing a list of names and phone numbers in the form "First_Last_Phone." Write a program to extract the phone numbers and store them in the output file.
Example input/output:
Enter the file name: input_names.txt
Output file name: phone_input_names.txt
1) Name your program phone_numbers.c
2) The output file name should be the same name but an added phone_ at the beginning. Assume the input file name is no more than 100 characters. Assume the length of each line in the input file is no more than 10000 characters.
3) The program should include the following function: void extract_phone(char *input, char *phone); The function expects input to point to a string containing a line in the “First_Last_Phone” form. In the function, you will find and store the phone number in string phone.
In: Computer Science
1. Explain the factors that might lead to network intrusion through wireless connections.
2. Describe a cybersecurity attack or data breach that affected you personally.
In: Computer Science