Questions
Java - In this lab, you will be writing your own method using the brute force...

Java - In this lab, you will be writing your own method using the brute force algorithm, to solve a second degree polynomial.
This method will take in four parameters, three coefficients, and one constant, and it will have the following signature:

public static String bruteForceEquationSolver(int one, int two, int three, int constant){}

The equation you are trying to solve is of the following format, given the parameters stated above:

(constant) = (one) * x + (two) * y + (three) * z

X, Y, and Z are variables that you are finding solutions for.

For example, if you were to call the method with parameters (2, 3, 4, 42), you would be finding the solution for the equation 2x + 3y + 4z = 42.

Some specifications for the method:

  • Your method should try every possibility within the range (1-10) for each variable. Check possibilities using nested for loops, starting with x, then y, then z.
  • Your method should return if a solution is found, and return a string with the solutions in the following format:

    x: xSolution y: ySolution z: zSolution

    There should be a space between the solution and the next variable, and each variable letter should be followed by a colon and a space.

  • If no solution is found, return the string “Solution not found.”.

Call the testBFES() method from main after completing this method to ensure it is working as expected.

Here's what I have so far:

public static String bruteForceEquationSolver(int one, int two, int three, int constant) {
    // student code here
        for (int i = 1; i <= 10; i++) {
            for (int j = 1; j <= 10; j++) {
                for (int k = 1; k <= 10; k++) {
                }
            }
        }
        return String.format("x:%d y:%d z:%d", one, two, three); 
}
public static void testBFES() {
System.out.println("Testing Brute Force Equation Solver");
String expected = "x: 2 y: 3 z: 4";
System.out.println("Expecting: " + expected);

String actual = bruteForceEquationSolver(3, 4, 6, 42);
System.out.println("Actual: " + actual);

boolean correct = expected.equals(actual);
System.out.println("Outputs equal? " + correct);
}

public static void testMT() {
System.out.println("Testing Multiplication Table");

String expected = "1\t2\t3\t4\t\n2\t4\t6\t8\t\n3\t6\t9\t12\t\n";
System.out.print("Expecting:\n" + expected);

String actual = multiplicationTable(3, 4);
System.out.print("Actual:\n" + actual);

boolean correct = expected.equals(actual);
System.out.println("Outputs equal? " + correct);
}

In: Computer Science

doing some research on Google or Bing for Hotel TV remote control systems .  List your sources....

doing some research on Google or Bing for Hotel TV remote control systems .  List your sources. Be sure to answer all the questions listed below

Discuss each of the following:
1. What does the device do?
2. What data does the device store, manage, or transmit?
3. How valuable is the data?
4. How could an intruder get this data?
5. What harm would result if the intruder succeeded in getting the data or in controlling the device?

In: Computer Science

1. For this question, assume a simple programming language (SPL) has been designed to write a...

1. For this question, assume a simple programming language (SPL) has been designed to write a straight-line program (SLP). Programs written in this simple programming language, such as the sample program P1 shown below, allow the implementation of only statements and expressions, but no loops or if-statements. Note the print function will take an expression list as its arguments.


       Program P1:
           a := 2 + 5; b := (print (a, a-1), 7 * a) ; print (b)
      

Execution of this program will yield output
                       7 6

49


a.) What is the grammar being used to specify the syntax of this language?

b.) What is a concrete syntax of the program? (Hint: parse tree)

In: Computer Science

Implement the following in Classless IP Addressing in C programming using decimal number system (a) Compute...

Implement the following in Classless IP Addressing in C programming using decimal number system (a) Compute First Address, Last address and Number of address from given IP address and mask. Input is given by the user

In: Computer Science

Write a program of linked list in which in which element can be inserted only at...

Write a program of linked list in which in which element can be inserted only at the end of the linked list and deletion can also take place at the end.

Code needed in java.

In: Computer Science

                                     SPOOL output.log DROP TABLE Customers

                                     SPOOL output.log


DROP TABLE Customers CASCADE CONSTRAINT;

DROP TABLE Orders CASCADE CONSTRAINT;

DROP TABLE Products CASCADE CONSTRAINT;

DROP TABLE Distributors CASCADE CONSTRAINT;

DROP TABLE Catalogs CASCADE CONSTRAINT;

DROP TABLE Rentals CASCADE CONSTRAINT;

CREATE TABLE Customers (
Customer_id NUMBER(10) NOT NULL,
CustomerFirst_name VARCHAR(20) NOT NULL,
CustomerLast_name VARCHAR(20) NOT NULL,
CustomerStreet_address VARCHAR(30) NOT NULL,
CostumerCity VARCHAR(20) NOT NULL,
CustomerState CHAR(2) NOT NULL,
CostumerZip VARCHAR(9) NOT NULL,
CustomerPhone_number VARCHAR(12) NOT NULL,
CONSTRAINT Customer_PK PRIMARY KEY (Customer_id));

--Customers
INSERT INTO Customers (Customer_id, CustomerFirst_name, CustomerLast_name, CustomerStreet_address, CostumerCity, CustomerState,
CostumerZip, CustomerPhone_number) VALUES ('100', 'Ben', 'Bill', '201 Ash Street', 'San Silva', 'MD', '20850', '443-123-4567');
INSERT INTO Customers (Customer_id, CustomerFirst_name, CustomerLast_name, CustomerStreet_address, CostumerCity, CustomerState, CostumerZip,
CustomerPhone_number) VALUES ('101', 'James', 'Seth', '142 Athens Avenue', 'Silver Boro', 'MD', '20841', '443-230-4444');
INSERT INTO Customers (Customer_id, CustomerFirst_name, CustomerLast_name, CustomerStreet_address, CostumerCity, CustomerState,
CostumerZip, CustomerPhone_number) VALUES ('200', 'Victor', 'Jones', '124 Flower Street', 'Rockville','MD', '20857', '301-547-2036');
INSERT INTO Customers (Customer_id, CustomerFirst_name, CustomerLast_name, CustomerStreet_address, CostumerCity, CustomerState, CostumerZip,
CustomerPhone_number) VALUES ('300', 'Ashley', 'Maverick', '105 University Boulevard', 'Baltimore', 'MD', '21593', '228-567-8174');
INSERT INTO Customers (Customer_id, CustomerFirst_name, CustomerLast_name, CustomerStreet_address, CostumerCity, CustomerState, CostumerZip,
CustomerPhone_number) VALUES ('450', 'Bill','Booker', '208 New Hampshire Avenue', 'Wheaton', 'MD', '20103', '250-413-7020');


CREATE TABLE Orders(
Order_id NUMBER(10) NOT NULL,
OrderDate DATE DEFAULT SYSDATE,
CONSTRAINT Order_PK PRIMARY KEY (Order_id));

-- Order
INSERT INTO Orders (Order_id, OrderDate) VALUES ('1', TO_DATE('02/05/2007','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate) VALUES ('2', TO_DATE('2/20/2011','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate) VALUES ('3', TO_DATE('02/05/2003','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate) VALUES ('4', TO_DATE('02/05/2005','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('5', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('6', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('7', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('8', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('9', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('10', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('11', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('12', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('13', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('14', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('15', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('15', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('16', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('17', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('18', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('19', TO_DATE('02/05/2006','MM/DD/YYYY'));
INSERT INTO Orders (Order_id, OrderDate)VALUES ('20', TO_DATE('02/05/2006','MM/DD/YYYY'));

CREATE TABLE Products (
Product_id NUMBER(10) NOT NULL CONSTRAINT Product_PK PRIMARY KEY,
ProductDescription VARCHAR2(50),
ProductMovieType varchar(11),
Order_id NUMBER(10) NOT NULL
CONSTRAINT Product_FK REFERENCES Orders (Order_id));

-- Product
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('1', 'Beauty and the Beast', 'Romance','6');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('2', 'Mist', 'Thriller','7');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('3', 'Police Academy', 'Comedy','8');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('5', 'When Sally met Harry', 'Romance','9');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('6', 'Rambo', 'Action','10');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('7', 'Rambo', 'Action','10');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('8', 'Rambo', 'Action','10');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('9', 'Rambo', 'Action','10');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('10', 'Rambo', 'Action','10');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('11', 'Rambo', 'Action','10');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('12', 'Beauty and the Beast', 'Romance','6');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('13', 'Mist', 'Thriller','7');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('14', 'Police Academy', 'Comedy','8');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('15', 'When Sally met Harry', 'Romance','9');
INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('16', 'Rambo', 'Action','10');

CREATE TABLE Distributors (
DistributorDisc_id NUMBER(11,0) NOT NULL,
DistributorPrice NUMBER(11,0) NOT NULL,
DistributorOrderQuantity NUMBER(11),
Order_id NUMBER(10) NOT NULL,
CONSTRAINT Distributor_PK PRIMARY KEY (DistributorDisc_id) ,
CONSTRAINT Distributor_FK FOREIGN KEY (Order_id) REFERENCES Orders (Order_id));

-- Distributor
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('1', '5','10', '11');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('2', '5','10', '12');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('3', '15','10','13');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('4', '5','10', '14');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('5', '5','10', '15');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('6', '5','10', '15');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('7', '5','10', '15');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('8', '5','10', '15');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('9', '5','10', '15');
INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('10', '5','10', '15');

CREATE TABLE Catalogs (
Catalog_id NUMBER(5,0) NOT NULL,
CatalogRating VARCHAR(10) NOT NULL,
CatalogAcademyAwards VARCHAR(50) NOT NULL,
CatalogDateReleased DATE DEFAULT SYSDATE,
Product_id NUMBER(10) NOT NULL,
Order_id NUMBER(10) NOT NULL,
DistributorDisc_id NUMBER(11,0) NOT NULL,
CONSTRAINT Catalog_PK1 PRIMARY KEY (Catalog_id),
CONSTRAINT Catalog_FK1 FOREIGN KEY (Order_id) REFERENCES Orders (Order_id),
CONSTRAINT Catalog_FK2 FOREIGN KEY (Product_id) REFERENCES Products (Product_id),
CONSTRAINT Catalog_FK3 FOREIGN KEY (DistributorDisc_id) REFERENCES Distributors (DistributorDisc_id));

-- Catalog
INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
VALUES ('1', 'Rated R','2',TO_DATE('02/05/2000','MM/DD/YYYY'),'7','16','6');
INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
VALUES ('2', 'Parental Guide', '12', TO_DATE('02/05/2001','MM/DD/YYYY'),'8','17','7');
INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
VALUES ('3', 'Youth','3',TO_DATE('02/05/2002','MM/DD/YYYY'), '9','18','8');
INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
VALUES ('4', 'Everyone','8', TO_DATE('02/05/2003','MM/DD/YYYY'),'10','19','9');
INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
VALUES ('5', 'Preschool','9',TO_DATE('02/05/2004','MM/DD/YYYY'),'11','20','10');


CREATE TABLE Rentals(
Rental_id NUMBER(9) NOT NULL,
RentalReturnDate DATE DEFAULT SYSDATE,
RentalRentedQuantity VARCHAR(2) NOT NULL,
RentalTotal_charge NUMBER(19,4) NOT NULL,
RentalTax NUMBER(19,4) NOT NULL,
Product_id NUMBER(10) NOT NULL,
CONSTRAINT Rental_PK PRIMARY KEY(Rental_id),
CONSTRAINT Rental_FK FOREIGN KEY(Product_id) REFERENCES Products(Product_id));
-- Rental
INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
VALUES ('1', TO_DATE('04/05/2009','MM/DD/YYYY'), '35','17.99', '0.3','11');
INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
VALUES ('2', TO_DATE('03/04/2001','MM/DD/YYYY'), '34','17.99', '0.3','12');
INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
VALUES ('3', TO_DATE('04/03/2002','MM/DD/YYYY'), '33','17.99', '0.3','13');
INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
VALUES ('4', TO_DATE('04/01/2003','MM/DD/YYYY'), '32','17.99', '0.3','14');
INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
VALUES ('5', TO_DATE('04/03/2004','MM/DD/YYYY'), '31','17.99', '0.3','15');

SPOOL OFF;

Error message

             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('1', 'Beauty and the Beast', 'Romance','6')
                                                                                                                        *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('2', 'Mist', 'Thriller','7')
                                                                                                        *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('3', 'Police Academy', 'Comedy','8')
                                                                                                                  *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('5', 'When Sally met Harry', 'Romance','9')
                                                                                                                        *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('6', 'Rambo', 'Action','10')
                                                                                                         *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('7', 'Rambo', 'Action','10')
                                                                                                         *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('8', 'Rambo', 'Action','10')
                                                                                                         *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('9', 'Rambo', 'Action','10')
                                                                                                         *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('10', 'Rambo', 'Action','10')
                                                                                                          *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('11', 'Rambo', 'Action','10')
                                                                                                          *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('12', 'Beauty and the Beast', 'Romance','6')
                                                                                                                         *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('13', 'Mist', 'Thriller','7')
                                                                                                         *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('14', 'Police Academy', 'Comedy','8')
                                                                                                                   *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('15', 'When Sally met Harry', 'Romance','9')
                                                                                                                         *
ERROR at line 1:
ORA-01722: invalid number


INSERT INTO Products (Product_id, ProductDescription, ProductMovieType, Order_id) VALUES ('16', 'Rambo', 'Action','10')
                                                                                                          *
ERROR at line 1:
ORA-01722: invalid number


CREATE TABLE Distributors (
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('1', '5','10', '11')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('2', '5','10', '12')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('3', '15','10','13')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('4', '5','10', '14')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('5', '5','10', '15')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('6', '5','10', '15')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('7', '5','10', '15')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('8', '5','10', '15')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('9', '5','10', '15')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


INSERT INTO Distributors (DistributorDisc_id, DistributorPrice, DistributorOrderQuantity, Order_id) VALUES ('10', '5','10', '15')
*
ERROR at line 1:
ORA-00001: unique constraint (CM320P17.DISTRIBUTOR_PK) violated


CREATE TABLE Catalogs (
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.CATALOG_FK2) violated - parent key
not found


INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.CATALOG_FK2) violated - parent key
not found


INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.CATALOG_FK2) violated - parent key
not found


INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.CATALOG_FK2) violated - parent key
not found


INSERT INTO Catalogs (Catalog_id,CatalogAcademyAwards,CatalogRating, CatalogDateReleased, Product_id, Order_id, DistributorDisc_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.CATALOG_FK2) violated - parent key
not found


CREATE TABLE Rentals(
              *
ERROR at line 1:
ORA-00955: name is already used by an existing object


INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.RENTAL_FK) violated - parent key not
found


INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.RENTAL_FK) violated - parent key not
found


INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.RENTAL_FK) violated - parent key not
found


INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.RENTAL_FK) violated - parent key not
found


INSERT INTO Rentals (Rental_id, RentalReturnDate, RentalRentedQuantity, RentalTotal_charge, RentalTax, Product_id)
*
ERROR at line 1:
ORA-02291: integrity constraint (CM320P17.RENTAL_FK) violated - parent key not
found

In: Computer Science

**Please don't use handwriting **Please don't copy and paste use your own word Q1:What are the...

**Please don't use handwriting
**Please don't copy and paste use your own word


Q1:What are the roles of a project sponsor and the approval committee during the different SDLC phases?


Part 2:

Assume the following scenario:

A small company needs to develop an information system for the Finance and Accounting Department. As an analyst which process model would you prefer and why?



Part 3:There are three techniques which help users discover their needs for the new system, list and compare these techniques in terms of impactful changes. Also, explain BPR.

In: Computer Science

A C program that going to accept a single command line arg and convert it to...

A C program that going to accept a single command line arg and convert it to hexadecimal as an array of char that has 16 bits. The array should contain the hex of the int argument. Side note the command line arg is a valid signed int and the program should be able to convert negative numbers.

In: Computer Science

use a match almost once. consider rhe following instance variable and method. private int[]arr; puplic int...

use a match almost once.
consider rhe following instance variable and method.
private int[]arr;
puplic int i(intx){
   \\PRECOND
   for (intk =arr.length-1;k>=0;k--){
   \\LOOPINVAR
   is(arr[k]<x)returnk;
   }
   \\POSTCOND
   RETURN-1;
}
Let:int m=f(n)

                                       1.assert(a!=null);
                                       2.assert(a.length>0);
                                       3.assert(true)
                                       4.assert(false);
                                       5. All values in positions 0 through m are less than n.
                                       6. All values in positions m+1 through arr.lenght-1 are greater than or equal to n.
                                       7.All the values in positions m+1 through arr.lenght-1 are less then n.
                                       8.The smallest value is at position m.
                                       9.The largest value that is smaller that n is at position m.
                                       10.All values in positions k+1 through arr.length-1 are greater than or equal to n.
                                       11.All values in positions k though arr.length-1 are less than n.
                                       12.all values in positions 0 through k are less than n
                                       13.int[] arr={3,9,3,5,8}
                                       assertTrue(f(4)==2);
                                       14.int[] arr={1,9,3,5,8}
                                       assertTrue(f(4)==0);
The best Preconditions is ____
junit test for thr method that fails____
Best postondition____
junit test for the method that passes_____
Loop invariant_____

In: Computer Science

Write a Python script that will be used as a calculator to allow simple arithmetic computation...

Write a Python script that will be used as a calculator to allow simple arithmetic computation of two input integer numbers.

Requirements:

a. The script should first allow the user to select if they want to add, subtract, multiply or divide two integer digits.

b. The script should pass the user inputs to a function using arguments for computation and the results return to the main part of the script.

c. The return value will be tested to determine if it is a positive number or a negative number.

In: Computer Science

Write a Python script that will collect 5 grades (float) from the student via input and...

Write a Python script that will collect 5 grades (float) from the student via input and obtain the average.

requirements:

a. Collect 5 floating grades from student

b. Obtain the average of the grades

In: Computer Science

Describe the differences between malware analysis methods – Static vs Dynamic ▪

Describe the differences between malware analysis methods – Static vs Dynamic

In: Computer Science

How do organizations get malware that needs to be analyzed? ▪ Pre-compromise – Email, web surfing...

How do organizations get malware that needs to be analyzed?

▪ Pre-compromise – Email, web surfing interception, or honeypot collection

▪ Post-compromise - Incident response collection

In: Computer Science

I NEED THIS CODE FOR C++ IUSING SEMAPHORES PLEASE #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include...

I NEED THIS CODE FOR C++ IUSING SEMAPHORES PLEASE

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>

#define THREADS 10 // Number of Thread

//bridge declared with array of character and integer value
void Bridge(char array[], int value);

// Global Variable
int North = 1; //For North Number
int South = 1; //For South Number
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; // Setting Up MUTEX for lock

//Thread for North farmer
void NorthFarmer(){
pthread_mutex_lock(&mutex1);
char array[5] = "North"; // North
printf("%s Tunbridge #%d farmer can cross the bridge\n", array, North);
Bridge(array, North);
printf("%s Tunbridge #%d farmer has left the bridge\n\n", array, North);
North++;
pthread_mutex_unlock(&mutex1);
pthread_exit(0);
}
//Thread for South farmer
void SouthFarmer(){
pthread_mutex_lock(&mutex1);
char array[5] = "South";
printf("%s Tunbridge #%d farmer can cross the bridge\n", array, South);
Bridge(array, South);
printf("%s Tunbridge #%d farmer has left the bridge\n\n", array, South);
South++;
pthread_mutex_unlock(&mutex1);
pthread_exit(0);
}

//void method for bridge
void Bridge(char array[], int value){
srand(time(NULL));
printf("%s Tunbridge #%d is traveling on the bridge...\n", array, value);
int randomnumber = rand() % 4;
sleep(randomnumber);
}

//main method
int main(){
pthread_t North[THREADS]; // North Thread
pthread_t South[THREADS]; // South Thread
pthread_mutex_init(&mutex1,NULL);

for(int i = 0; i < THREADS; i++){
int CreateFirst = pthread_create(&North[i], NULL, NorthFarmer, NULL);
int CreateSecond = pthread_create(&South[i], NULL, SouthFarmer, NULL);
if(CreateFirst != 0 || CreateSecond != 0){
fprintf(stderr, "Thread Create Failed");
return 1;
}
}

for(int i = 0; i < THREADS; i++){
int JoinFirst = pthread_join(North[i],NULL);
int JoinSecond = pthread_join(South[i],NULL);
if(JoinFirst != 0 || JoinSecond != 0){
fprintf(stderr, "Join Failed");
return 1;
}
}

//destroy the mutex lock
pthread_mutex_destroy(&mutex1);
return 0;
}

In: Computer Science

I'm trying to ask a series of questions with validation in python. example: What is your...

I'm trying to ask a series of questions with validation in python.

example:

What is your name? (if valid name then continue to question 2)

What is your email? (if not valid then ask this question again, if valid then next question)

How old are you? (again, if invalid then ask again, if valid then next.

import re

def get_new_artwork():

    name_regex = "^(?=.{2,40}$)[a-zA-Z]+(?:[-'\s][a-zA-Z]+)*$"

    email_regex = '^[a-z0-9]+[\._]?[a-z0-9]+[@]\w+[.]\w{2,3}$'

    while True:

        name = input('Enter your name: ').title().strip()

        if re.search(name_regex, name) is None:

            print('Invalid name. ')

        else:

            email = input('Enter your email: ')

            if re.search(email_regex, email) is None:

                print('Invalid email. ')

            else:

                age = int(input('How old are you? '))

                if age >=17:

                    print('Too young. ')

                else:                  

                    print('user added. ')

                    break

    return (name, email, age)     

get_new_artwork()

In: Computer Science