1. Please briefly describe in one short paragraph a valuable business problem that you are interested in solving and how designing a database can help in solving this problem. You should treat this database design project as something you can put on your CV and explain to potential employers (or potential investors if you are pursuing a startup).
2. Create three tables that you will use in your database. Write the SQL code (can be done in PgAdmin or in MS Word etc.). Then write a short paragraph explaining the purpose of each table.
In: Computer Science
Use the internet and research the impact that information technology and the internet has on society, the economy, and the environment. Give positive and negative examples.
In addition, discuss strategies for safeguarding computers, mobile devices, and networks against attacks while using the internet.
In: Computer Science
SQL
Consider the following business question and determine which of the following should be included in a fact/dimension table of the star schema
What was the revenue of the McDonald’s in Russia and France in 2017?
A. Russia
B. France
C. Revenue
D. Countries
Answer for both Fact and Dimension tables.
Please determine from the question which is part of the fact, and which is part of the dimension. There should be two answers.
In: Computer Science
Create a C++ program that will prompt the user to input an integer number and output the corresponding number to its numerical words. (From 0-1000000 only)
**Please only use #include <iostream> and switch and if-else statements only. Thank you.
Ex.
Enter a number: 68954
Sixty Eight Thousand Nine Hundred Fifty Four
Enter a number: 100000
One Hundred Thousand
Enter a number: -2
Number should be from 0-1000000 only
In: Computer Science
In C programming language how do you find if all the character on a single line in a 2 dimensional array are the same?
The program should read line by line to check if all the characters on a line are the same. For this program we want to see if the * character ever shows up on a line where it is the only character on the line. as seen below.
so lets say we have a array with the following data:
Note(this is a 5x7 two dimensional array)
D C D D * D C
D C C C D * *
* * * * * * *
D C C D * D *
* * * * * * *
So i want to return the amount of lines that have the * in every position in that row. So in this array 2 lines have all the same characters which is a * so it should print "The amount of lines where the * character is the only character that appears is 2"
In: Computer Science
Write a C program
Your program will prompt the user to enter a value for the
amount of expenses on the credit card. Retrieve the user input
using fgets()/sscanf() and save the input value in a variable. The
value should be read as type double. The user may or may not enter
cents as part of the input. In other words, expect the user to
enter values such as 500, 500.00 and 500.10. The program will then
prompt the user to enter the Annual Percentage Rate (APR) for the
credit card. This value should also be read as type double and
saved in a second variable. Next, your program will prompt the user
to enter the number of days money is borrowed. This value should be
read as type int. After the values have been entered, your program
will calculate the amount of the interest and save the result in a
fourth variable. The program will then add the interest amount to
the expense amount and save this result in a fifth variable.
Finally, it will print all five variables (expense amount, APR,
number of days, amount of interest and total amount to be paid
back) to the screen in an informative format. Ensure that the
floating point output always displays exactly two decimal places.
Also, values of a magnitude less than 1 should display a leading 0
(ex. 0.75).
For interest calculation, we will use the compound interest method,
in which, we consider not only the interest on the actual borrowed
amount, but also the interest of interest that has already accrued.
We will use the following simple formula to compute compound
interest:
P' = P(1 +
r/n)^(nt)
where:
P is the original
principal sum
P' is the new
principal sum
r is the annual
interest rate
n is the
compounding frequency (we assume it to be 12, like most US
banks)
t is the overall
length of time the interest is applied (expressed in years).
The total compound interest generated is the final value minus the
initial principal:
I = P' - P
In order to compute the power function, you need to include math.h
library and call the pow() function within it. See the man page of
pow() to find more information about it. Also note that, the number
of days money is borrowed needs to be converted to number of years.
If you simply try days/365 to express it in terms of years, the
result of the division is likely going to be incorrect. The annual
interest rate, r, can be obtained from the annual percentage rate
(APR), using r = APR/100.
Your program should check to ensure that negative values are not
input. If an improper value is entered, an error message should be
printed and the program will exit (do not re-prompt the user for a
correct value).
For input, you must use the fgets()/sscanf() combination of
Standard I/O functions. Do not use the scanf() or fscanf()
functions. Although using scanf() for retrieving numerical data is
convenient, it is problematic when used in conjunction with
character string input (as you may discover if you use it in later
labs). Therefore, it is best to get into the habit of avoiding
scanf() completely, and using the fgets()/sscanf() combination
exclusively.
In: Computer Science
You have been asked to create a project plan for the new machine learning model your company has asked you to build. List the main tasks and sub-tasks you would need to complete to create the model on AWS AND How would you measure the accuracy of the model you created?
In: Computer Science
Given the following mix of job, job lengths, and arrival times, assume a time slice of 10 and compute the completion for each job and average response time for the FCFS, SJN, SRT, and Round Robin Scheduling Algorithm.
jobs arrival time CPU cycle(ms)
A 0 16
B 3 2
C 5 11
D 9 6
E 10 1
F 12 9
G 14 4
H 16 14
I 17 1
J 19 8
In: Computer Science
Question #1 Please specify he output of the following code (2.4) # import the pandas library and aliasing as pd import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(8, 4), index = ['a','b','c','d','e','f','g','h'], columns = ['A', 'B', 'C', 'D']) # for getting values with a boolean array print df.loc['a']>0
Question #2 Please specify the output of the following code (2.2)
import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(5, 3), index=['a', 'c', 'e', 'f', 'h'],columns=['one', 'two', 'three']) df = df.reindex(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']) print df.dropna(axis=1)
Question #3 Given the following temp.csv (2.1)
S.No,Name,Age,City,Salary 1,Tom,28,Toronto,20000 2,Lee,32,HongKong,3000 3,Steven,43,Bay Area,8300 4,Ram,38,Hyderabad,3900
Please specify what is the output of the following code:
import pandas as pd
df=pd.read_csv("temp.csv",names=['a','b','c','d','e'],header=0)
print df
Question 4 Please describe what the following code is doing (2.3)
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randn(10, 4),
index = pd.date_range('1/1/2000', periods=10),
columns = ['A', 'B', 'C', 'D'])
print df
r = df.rolling(window=3,min_periods=1)
print r['A'].aggregate(np.sum)In: Computer Science
Comprehension and Coding 12. Nadha Skolar needs to write a method smallToBig() that will accept 3 integers as parameters and print out the sequence of numbers smallest to largest. For example, regardless of whether the sequence is 3 5 7, 5 7 3, 3 7 5, the method should print out 3 5 7. Nadha writes the following in IntelliJ and feels pretty confident until he submits the code to zyBooks… public static void smallToBig (int num1, int num2, int num3){ int min, middle, max; if (num1 <= num2){ min = num1; middle = num2; if (num1 <= num3) { middle = num1; max = num3; } else { middle = num3; max = num1; } } else { min = num2; middle = num1; if (num2 <= num3) { middle = num2; max = num3; } else { middle = num3; max = num2; } } System.out.println("Min = " + min + " Mid = " + middle + " Max = " + max); } Describe the error in Nadha’s program and how you could correct it. You do not have to code the fix
In: Computer Science
Research the topic of binary search trees. Write a brief summary of your understanding of this. Design a simple program, using pseudocode, that performs a search of a binary search tree.. In your own words, explain how a binary search tree works using graph theory terminology. Construct a binary search tree for any alphabetically ordered list of five words. Represent it visually as a graph. Discuss any characteristics you note about the graph you created in part (d). In your discussion, make sure to address the following: What are the degrees of each vertex? Is it a complete graph? Is the graph planar?
In: Computer Science
I need to make this into a Java Code:
Write a program that prompts the user for a double value representing a radius. You will use the radius to calculate:
You must use π as defined in the java.lang.Math class.
Your prompt to the user to enter the number of days must be:
Enter radius:
Your output must be of the format:
Circle Circumference = circleCircumference
Circle Area = circleArea
Sphere Area = sphereArea
Sphere Volume = sphereVolume
Please make sure to end each line of output with a newline.
Please note that your class should be named CircleSphere.
In: Computer Science
Parameter Mystery. Consider the following program. List below the exact output produced by the above program (we do not claim that every line of output makes sense ;-).
public class Mystery
{ public static void main(String[] args)
{ String john = "skip";
String mary = "george";
String george = "mary";
String fun = "drive"; statement(george, mary, john);
statement(fun, "george", "work");
statement(mary, john, fun);
statement(george, "john", "dance"); }
public static void statement(String mary, String john, String fun)
{ System.out.println(john + " likes to " + fun + " with " + mary); } }
I know the output is
george likes to skip with mary george likes to work with drive skip likes to drive with george john likes to dance with mary
But I don't know why- can I get an explanation as to why???
In: Computer Science
#include <iostream>
#include <string>
using namespace std;
int main ()
{
//declarations
string name;
//input
cout <<"Enter your first name" << endl;
cin >> name;
//output
cout << "Hello " << name << "! " << endl;
return 0;
}
int age;
Add the following lines to your program:
cout << “Enter your age” << endl;
cin >> age;
Compile and Run.
What type is age? Describe this type.
float bodyTemp;
Add the lines to input and out your body temperature. Compile and run.
What type is bodyTemp? Describe this type.
Height (hint, use two variables)
Weight
Sex (hint, use the char type)
Last name
Answers to these questions only:
In: Computer Science
Give the value of x (x is an integer and assume integer arithmetic for all operations).
________ 1. x = 12 - 4 * 2 - 8;
________ 2. x = 24 / 2 + 1 * 4;
________ 3. x = 12 - 9 + 4 * 2 + 3 ^ 4;
________ 4. x = 24/(3 + 2) * 4;
________ 5. x = 2 * (5 - 3) + 7;
________ 6. x = 12 - (15/5 - 2) * 5;
________ 7. x = 20 - 15/((5 - 2) * 5);
________ 8. x = 13 % 5;
Evaluate the following equations, given A = 12, B = 3, C = 6, D = 2 ,A, B, C, and D are integers, and all operations are integer
________ 9. x = A + B/C - D^2.;
________ 10. x = A + B/(C - D^2);
________ 11. x = (A + B) % C;
________ 12. x = (A + B)/C - D^2;
Assume the following order of operations:
!
&&
||
Give the value of x,
given A = FALSE, B = FALSE, C = FALSE, D = TRUE. E = 10, F = 15
________ 13. x = A && B
________ 14. x = C || D
________ 15. x = !C
________ 16. x = !(A && D)
________ 17. x = !C && B
________ 18. x = ( E < 10) && (E == F)
________ 19. x = A && B || C && D
________ 20. x = !(A && B) || !(D && C)
Write c++ statements for each of the following (no declarations necessary here):
In: Computer Science