[solved] – Question 94686
Computer (vendor, model, machinetype)
Model (num, speed, ram, hd, price)
Vendor (name, address, phone)
Where vendor indicates the manufacturer of a computer, and machine type takes values such as “desktop”, “laptop” and “server”. Underline indicates the primary key. Following inclusion dependencies hold: vendor ⊆ name, and model ⊆ num. Express following queries in relational algebra:
A. Find all the vendors who make laptop(s).
Expert Answer
[solved] – Question 94700
Write a program to enter a number and test if it is greater than 45.6. If the number entered is greater than 45.6, the program needs to output the phrase Greater than 45.6.
Example:
Enter a number: 90
Output:
Greater than 45.6
Expert Answer
[solved] – Question 94735
The general form of the equation of a straight line can be expressed as Ax + By + C = 0 with a condition that A and
B cannot both be zero. This equation can also be expressed as: y=
−(
Expert Answer
[solved] – Question 94788
Depict the digit 1011001110 in (1) Manchester code and (2) bipolar RZ format.
Expert Answer
[solved] – Question 94796
For this lab you will find the area of an irregularly shaped room with the shape as shown above.
Ask the user to enter the values for sides A, B, C, D, and E and print out the total room area.
Remember the formula for finding the area of a rectangle is length * width and the area of a right triangle is 0.5 * the base * height.
Please note the final area should be in decimal format.
Sample run:
Enter side A: 11
Enter side B: 2
Enter side C: 4
Enter side D: 7
Enter side E: 1
Output:
Room Area: 53.5
Need help with input
Expert Answer
[solved] – Question 94800
Problem Statement:
Take user input for 2 numbers (num1 and num2). Write a program to perform the following operations:
Add = num1 + num2
Subtract = num1 – num2
Divide = num1 / num2
Modulus = num1 / num2
Multiply = num1 * num2
Find the greater of the 2 numbers, unless both numbers are equal (where you can display “numbers are equal”).
Note:
If a user enters a non-numeric entry (for any of the 2 numbers), exit the program with a message “Incorrect input, program exiting!!” displayed on screen.
The program should be able to accept any (both whole number and/or decimal, positive, negative etc.) numeric entries.
If one or more operations are not (mathematically) possible on the 2 numbers (e.g. 0/0), display a message, on screen, for the operation/operation(s), e.g. “Division – Operation not possible.”
Example Program Output
If the two numbers entered, by user, were 3 and 8. Display on screen
“Sum of” 3 “and” 8 “Is” 11
“Modulus of ” 3 “and” 8 “is” 3
“Greater number of” 3 “and” 8 “is” 8.
Expert Answer
[solved] – Question 94821
Let’s play Silly Sentences!
Enter a name: Grace
Enter an adjective: stinky
Enter an adjective: blue
Enter an adverb: quietly
Enter a food: soup
Enter another food: bananas
Enter a noun: button
Enter a place: Paris
Enter a verb: jump
Grace was planning a dream vacation to Paris.
Grace was especially looking forward to trying the local
cuisine, including stinky soup and bananas.
Grace will have to practice the language quietly to
make it easier to jump with people.
Grace has a long list of sights to see, including the
button museum and the blue park.
Your output should be based on this template:
[name] was planning a dream vacation to [place].
[name] was especially looking forward to trying the local
cuisine, including [adjective 1] [food 1] and [food 2].
[name] will have to practice the language [adverb] to
make it easier to [verb] with people.
[name] has a long list of sights to see, including the
[noun] museum and the [adjective 2] park.
I
Expert Answer
[solved] – Question 94836
For the relations s and r in your study manual of our chapter 2 (i.e., joining two relations), suppose we type a collection of relational algebra queries, and get the following results.
A B C D E
A 2 a 10 B
B 2 a 10 b
i. Please explain how this happened? (10 Marks)
ii. If you think this result could happen in practice, please write the corresponding relational algebra queries; otherwise, please explain why. (15 Marks)
Expert Answer
Answer to For the relations s and r in your study manual of our chapter 2 (i.e., joining two relations), suppose we type a collection of relational algebra queries….

