Use only the operators discussed in class (select, project, Cartesian product, join, union, intersection, set difference and renaming). Type your answers.
Consider the following database schema:
INGREDIENT(ingredient-id,name,price-ounce)
RECIPE(recipe-id,name,country,time)
USES(rid,iid,quantity)
where INGREDIENT lists ingredient information (id, name, and the price per ounce); RECIPE lists recipe information (id, name, country of origin, and time it takes to cook it); and USES tells us which ingredients (and how much of each) a recipe uses. The primary key of each table is underlined; rid is a foreign key to RECIPE and iid is a foreign key to INGREDIENT.
Write the following queries in Relational Algebra.
(a) Find the names of French recipes that use butter and take longer than 45 minutes to cook.
(b) Find the names of recipes that use butter or lard.
(c) Find the names of recipes that use butter and lard.
(d) Find the name of recipes that do not use butter.
(e) Find the names of recipes that use 2 or more ingredients.
(f) (*) Find the names of recipes where at least 3 oz. (quantity) of every ingredient are used.
In: Computer Science
JAVA/Netbeans
•Design a class named Person with fields for holding a person’s name, address and phone number (all Strings)
–Write a constructor that takes all the required information.
–Write a constructor that only takes the name of the person and uses this to call the first constructor you wrote.
–Implement the accessor and mutator methods. Make them final so subclasses cannot override them
–Implement the toString() method
•Design a class named Customer, which extends the Person class. It should have a field for the Customer ID (String) and a Boolean field indicating whether the customer wishes to be on a mailing list.
–Write a constructor that takes the name of the customer, id, address, phone number and the Boolean. Use super to call the appropriate constructor in Person
–Write a constructor that takes the name of the customer and id only and uses this to call the first constructor you wrote. It should set the Boolean to false.
–Implement the accessor and mutator methods for the customer id and Boolean.
–Override the toString() method using @override and use super to call Person’s toString()
•Write a main method that asks the user for the info of two customers, the first asking only for name and id, and the second asking for all the information. It creates 2 Customers and prints them out.
In: Computer Science
2.13 Program: Food receipt (Python 3)
1.Enter food item name: hot dog
Enter item price: 2
Enter item quantity: 5
RECEIPT
5 hot dog @ $ 2.0 = $ 10.0
Total cost: $ 10.0
2.Enter food item name: hot dog
Enter item price: 2
Enter item quantity: 5
RECEIPT
5 hot dog @ $ 2.0 = $ 10.0
Total cost: $ 10.0
Enter second food item name: ice cream
Enter item price: 2.50
Enter item quantity: 4
RECEIPT
5 hot dog @ $ 2.0 = $ 10.0
4 ice cream @ $ 2.5 = $ 10.0
Total cost: $ 20.0
3.Enter food item name: hot dog
Enter item price: 2
Enter item quantity: 5
RECEIPT
5 hot dog @ $ 2.0 = $ 10.0
Total cost: $ 10.0
Enter second food item name: ice cream
Enter item price: 2.50
Enter item quantity: 4
RECEIPT
5 hot dog @ $ 2.0 = $ 10.0
4 ice cream @ $ 2.5 = $ 10.0
Total cost: $ 20.0
15% gratuity: $ 3.0
Total with tip: $ 23.0
In: Computer Science
In: Computer Science
Write a Java program to compute your final grade for the course.
Assume the following (you can hard-code these values in your program).
Assignments are worth 30%
Labs are worth 40%
Mid-term is worth 15%
Final is worth 15%
Ask for the grades in each category.
Store them in a double variable.
Print out the final percentage grade.
For example,
Final Grade Calculation
Enter percentage grades in the following order.
Assignments, Labs, Mid-term test, Final Exam: 95 88 86 92
The final grade is 90
2. Create a Project and a Class called “AgeCheck”
Write a Java program to ask the user for their name and age. Use a string variable for the name and an int variable for the age. Output a message using the name and whether the user is old enough to purchase alcohol (21 years old).
For example,
Age Checker
Enter your name: Steve
Enter your age: 19
Hello, Steve, you are only 19 and not old enough to purchase
alcohol.
Age Checker
Enter your name: Jane
Enter your age: 25
Hello, Jane, you are 25 and old enough to purchase alcohol.
In: Computer Science
i want Solution From Question Number 5 Solution Of questions 1-4
in Previou Post
Note (I Want ScreenShot For Solution)
Use Kali Linux Commands to show me the following:
1. Who are you?
2. Change directory to Downloads
3. Make a new directory
4. Make a new text file under your name (Ghada.txt)
5. Write a paragraph about Cyber security (4 to 5 sentences)
>>simply open the file and write
inside it
6. Change the permission to be 764
7. Open the file but with a cyber security match Show me each and
every step with figure
b. Enter into Portswagger lab (Username enumeration via subtly
different responses)
https://portswigger.net/web-security/authentication/password-based/lab-username-enumerationvia-subtly-different-responses
Show me step-by-step how to use burp to get the username and
password. Name the username list
with your name ex. Ghada_usename.txt and
Ghada_password.txt
Use Seed Machine (the same SQL injection website)to conduct SQL
Injection such that:
1. Update Boby nickname to be your name (by Alice)
2. Update Boby password to be (your name as a password) (by
Alice).
In: Computer Science
C++ programming
To store the information about a city and its weather forecast, create a struct that holds the city's name (string), population (int), and a forecast array storing 7 string elements representing the city's weather in the next 7 days.
The program will then accept user input to enter the name and population of the city, then it accepts 7 string inputs to store into the forecast array.
Then the program will output the city's name, population, and forecast data.
Ex: If the inputs are:
Houston 2313000 sunny sunny sunny rainy thunderstorm sunny sunny
the function outputs:
Houston Population: 2313000 7 Day Forecast: Day 0: sunny Day 1: sunny Day 2: sunny Day 3: rainy Day 4: thunderstorm Day 5: sunny Day 6: sunny
Your program must name the struct "city" with name, population, and forecast as the corresponding member names!
Your program must define and call this function to output the city information:
void city_info(city c)
#include <iostream>
using namespace std;
/* Define your struct here */
/* Define your printing function here */
int main() {
/* Type your code here */
return 0;
}
In: Computer Science
1. Classify each of these transactions as an asset, a liability, or neither for each of the “players” in the money supply process – the Federal Reserve, the banking system, and nonbank public.
a) You take a $10,000 loan from Bank One to buy an automobile
b) You deposit $400 into your checking account at the First National Bank of Huntsville
c) The Fed provides an emergency loan to a bank for $ 1 million
d) A bank borrows $500,000 in overnight loans from another bank
e) You use your debit card to purchase a meal at a restaurant for $50
2. Suppose that Mr. Justin Bieber deposits $5,000 in his checking account at Santa Monica Bank. How does this transaction affect the monetary base? Show the changes in the balance sheets for Mr. Bieber, the bank, and the Fed.
3. What are the major differences between a discount loan and an open market purchase with respect to their respective effects on monetary base? Explain using an example and showing the relevant changes in the balance sheets of the Fed and the Banking System. Between these two actions, is one preferred to the other by the Fed? Why or why not?
4. As the bankers’ bank, the Federal Reserve Banks operate the payments system in the United States? What are the different components of the payments system that they operate? Briefly describe.
5. What are the main arguments against central bank independence? Is the Fed independent? How do you know? Explain.
In: Economics
Problem 6-10 (Algo) Long-term contract; revenue recognition over time [LO6-8, 6-9]
[The following information applies to the questions
displayed below.]
In 2021, the Westgate Construction Company entered into a contract
to construct a road for Santa Clara County for $10,000,000. The
road was completed in 2023. Information related to the contract is
as follows:
| 2021 | 2022 | 2023 | |||||||
| Cost incurred during the year | $ | 2,490,000 | $ | 3,984,000 | $ | 2,008,600 | |||
| Estimated costs to complete as of year-end | 5,810,000 | 1,826,000 | 0 | ||||||
| Billings during the year | 2,030,000 | 4,444,000 | 3,526,000 | ||||||
| Cash collections during the year | 1,815,000 | 3,900,000 | 4,285,000 | ||||||
Westgate recognizes revenue over time according to percentage of
completion.
Problem 6-10 (Algo) Part 1
Required:
1. Calculate the amount of revenue and gross
profit (loss) to be recognized in each of the three years.
(Do not round intermediate calculations. Loss amounts
should be indicated with a minus sign.
2-a. In the journal below, complete the
necessary journal entries for the year 2021 (credit "Various
accounts" for construction costs incurred).
2-b. In the journal below, complete the necessary
journal entries for the year 2022 (credit "Various accounts" for
construction costs incurred).
2-c. In the journal below, complete the necessary
journal entries for the year 2023 (credit "Various accounts" for
construction costs incurred).
In: Accounting
Write a function that accepts a dictionary and produces a sorted list of tuples
The dictionary looks like this:
{‘US’: [{'Chicago, IL': ('2/1/2020 19:43', 2, 0, 0)}, {'San Benito, CA': ('2/3/2020 3:53', 2, 0, 0)}, {'Santa Clara, CA': ('2/3/2020 0:43', 2, 0, 0)}, {'Boston, MA': ('2/1/2020 19:43', 1, 0, 0)}, {'Los Angeles, CA': ('2/1/2020 19:53', 1, 0, 0)}, {'Orange, CA': ('2/1/2020 19:53', 1, 0, 0)}, {'Seattle, WA': ('2/1/2020 19:43', 1, 0, 0)}, {'Tempe, AZ': ('2/1/2020 19:43', 1, 0, 0)}], 'Australia' : [{'New South Wales': ('2/1/2020 18:12', 4, 0, 2)}, {'Victoria': ('2/1/2020 18:12', 4, 0, 0)}, {'Queensland': ('2/4/2020 16:53', 3, 0, 0)}, {'South Australia': ('2/2/2020 22:33', 2, 0, 0)}]
For these counts, I need to use the numbers that are bolded above). The returned sorted list (in descending order) will contain key-value pairs such that each key is a country and the corresponding value is the number of cases observed within that country.
For example: [('Australia', 13),(‘US’: 11)]
In: Computer Science