Questions
1) Which of the following is/are true? - C++ programs can run on different platforms, like...

1) Which of the following is/are true?

- C++ programs can run on different platforms, like Windows and macOS, without being recompiled.

- The source code for a program can include code from the C++ standard library.

- The machine language that results from compiling a program is easy for a human to read.

- All of the above

2) What feature of an IDE can help you identify and fix syntax errors?

-the code completion feature

-the automatic compilation feature

-the syntax integration feature

-the error detection feature

3) As you develop a C++ program, you can use an IDE to

-enter and edit the source code

-compile the source code

-run the application

-all of the above

-both b and c

4) You can use a console application to

-get data from the user

-display data to the user

-use a graphical user interface to interact with the user

-all of the above

-a and b only

5) An IDE typically stores all of the files for a program in a

-chapter

-library

-project

-header

6) Which of the following is used to convert the source code for a program to object code?

-linker

-preprocessor

-compiler

-none of the above

7) Which of the following is not a benefit of a typical IDE for C++?

-The syntax of your code is checked as you enter it.

-The debugging features make it easier for you to find bugs in your applications.

-The IDE helps you complete code as you type.

-Your code compiles and runs faster.

8) In an IDE, what tool do you use to enter and edit source code?

-debugger

-program builder

-compiler

-code editor

9) Which of the following is not a reason for learning C++?

Its syntax is easier to learn than the syntax of other languages like C# and Java.

It’s one of the fastest and most efficient languages available.

It’s an object-oriented language.

It’s designed to work with many operating systems and devices.

10) A syntax error occurs when

the C++ compiler can’t be located

the machine language can’t be interpreted properly

there’s a syntax error in a C++ statement

the program doesn’t contain a main() function

In: Computer Science

Digital Organics (DO) has the opportunity to invest $1.23 million now (t = 0) and expects...

Digital Organics (DO) has the opportunity to invest $1.23 million now (t = 0) and expects after-tax returns of $700,000 in t = 1 and $800,000 in t = 2. The project will last for two years only. The appropriate cost of capital is 12% with all-equity financing, the borrowing rate is 8%, and DO will borrow $200,000 against the project. This debt must be repaid in two equal installments of $100,000 each. Assume debt tax shields have a net value of $.30 per dollar of interest paid. Calculate the project’s APV. (Enter your answer in dollars, not millions of dollars. Do not round intermediate calculations. Round your answer to the nearest whole number.) Adjusted present value

In: Finance

Design and implement a relational database application of your choice using MS Workbench on MySQL a)...

Design and implement a relational database application of your choice using MS Workbench on

MySQL

a) Declare two relations (tables) using the SQL DDL. To each relation name, add the last 4 digits

of your Student-ID. Each relation (table) should have at least 4 attributes. Insert data to both

relations (tables); (15%)

b) Based on your expected use of the database, choose some of the attributes of each relation as

your primary keys (indexes). To each Primary Key name, add the last 4 digits of your Student-

ID by using Alter command. Explain why you choose them as the primary keys; (10%)

c) Specify one Update, one Delete, one Select, one Join, and one View in SQL that are needed by

your database application

In: Computer Science

In baseball, is there a linear correlation between batting average and home run percentage? Let x...

In baseball, is there a linear correlation between batting average and home run percentage? Let x represent the batting average of a professional baseball player, and let y represent the player's home run percentage (number of home runs per 100 times at bat). A random sample of n = 7 professional baseball players gave the following information.

x 0.255 0.251 0.286 0.263 0.268 0.339 0.299

y 1.5 3.9 5.5 3.8 3.5 7.3 5.0

(a) Make a scatter diagram of the data. Then visualize the line you think best fits the data.

(b) Use a calculator to verify that Σx = 1.961, Σx2 = 0.555, Σy = 30.5, Σy2 = 152.69 and Σxy = 8.842. Compute r. (Round to 3 decimal places.)

As x increases, does the value of r imply that y should tend to increase or decrease? Explain your answer.

Given our value of r, we can not draw any conclusions for the behavior of y as x increases.

Given our value of r, y should tend to remain constant as x increases.

Given our value of r, y should tend to increase as x increases.

Given our value of r, y should tend to decrease as x increases.

In: Statistics and Probability

Copy and paste the below code EXACTLY as shown into your Java environment/editor. Your task is...

Copy and paste the below code EXACTLY as shown into your Java environment/editor. Your task is to fill in the code marked as "...your code here...". A detailed explanation follows the code.

import java.util.*;
public class OddManOut {
  
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("How many random Integers to produce?");
int num = sc.nextInt();
  
ArrayList<Integer> randomInts = createRandomList(num);
System.out.println("The random list is: ");
System.out.println(randomInts);
  
removeOdds( randomInts );
System.out.println("The random list with only even numbers: ");
System.out.println(randomInts);
  
}
  
public static ArrayList<Integer> createRandomList(int num)
{
... YOUR CODE HERE ...
}
  
public static void removeOdds(ArrayList<Integer> list)
{
... YOUR CODE HERE ...
}
}

The program first asks you how many random numbers to produce (variable num). The program then calls createRandomList() which returns an ArrayList of Integers that contain random numbers between 1 and 20. The number of random numbers to produce depends on the variable num (i.e: if the user enters 50 then this method returns an ArrayList of Integers that contain 50 random numbers between 1 and 20). Once this list is displayed, the program calls removeOdds() which removes all numbers from the list that are odd leaving only the even numbers. Finally the program displays the modified list showing only even numbers.

Example output shown below:

How many random Integers to produce?

31

The random list is:

[6, 19, 8, 12, 13, 4, 12, 7, 16, 7, 21, 3, 16, 4, 17, 2, 4, 14, 2, 1, 3, 5, 7, 18, 17, 13, 10, 20, 8, 18, 20]

The random list with only even numbers:

[6, 8, 12, 4, 12, 16, 16, 4, 2, 4, 14, 2, 18, 10, 20, 8, 18, 20]

DELIVERABLES:

Upload your program below for marking. Note, for full marks you MUST NOT modify the starting code (code in red) in any way. Your task is only to fill in the "...your code here..." part of the two methods.

In: Computer Science

You have observed the following returns over time: Year Stock X Stock Y Market 2011 15...

You have observed the following returns over time:

Year Stock X Stock Y Market
2011 15 % 14 % 12 %
2012 20 7 8
2013 -13 -4 -12
2014 3 1 1
2015 21 11 14
Assume that the risk-free rate is 4% and the market risk premium is 6%. The data has been collected in the Microsoft Excel Online file below. Open the spreadsheet and perform the required analysis to answer the questions below.

What is the beta of Stock X? Do not round intermediate calculations. Round your answer to two decimal places.



What is the beta of Stock Y? Do not round intermediate calculations. Round your answer to two decimal places.


What is the required rate of return on Stock X? Do not round intermediate calculations. Round your answer to one decimal place.

%

What is the required rate of return on Stock Y? Do not round intermediate calculations. Round your answer to one decimal place.

%

What is the required rate of return on a portfolio consisting of 80% of Stock X and 20% of Stock Y? Do not round intermediate calculations. Round your answer to one decimal place.

In: Finance

a. suppose the multiplier is 1.5, the income multiplier with respect to the money supply is...

a. suppose the multiplier is 1.5, the income multiplier with respect to the money supply is 2, the money multiplier is 4.5, and a central bank purchase of $6b of bonds during a recession drops the interest rate by one percentage point. suppose that to fight a recession, monetary policy is undertaken to lower the interest rate by two-thirds of a percentage point. what should happen to the income level?

b.suppose the short run Phillips curve is duch that a two-percentage point increase in inflation decreases unemployment by one percentage point. suppose the economy is in long run equilibrium with a real growth rate of 2% and an unemployment rate of 7% and the central bank increases the rate of growth of the money supply from 5% to 8%. when the economy has reached its new long run equilibrium, what will be the levels of inflation and unemployment?

c.suppose that in equilibrium the Canadian dollar is depreciating relative to the U.S. dollar by 5% per year. suppose changes in the U.S. cause the U.S. real interest rate to rise from 3.5% to 4.5% and the U.S inflation rate to increase from 4% to 6%. assuming a risk premium of one percentage point, after the canadian economy has settled to a new equilibrium, what is its nominal interest rate?

In: Economics

The proportion of brown M&M's in a milk chocolate packet is approximately 14%. Suppose a package...

The proportion of brown M&M's in a milk chocolate packet is approximately 14%. Suppose a package of M&M's typically contains 66 M&M's.

a) State the random variable.

c) Explain why this is a binomial experiment. Check all that apply.

1). p = 14% remains constant from one randomly selected M&M to another

2). There are a fixed number of M&Ms,

3). 66 There are more than two outcomes for each M&M

4). There are only two outcomes for each M&M

5). Whether or not one randomly selected M&M is brown will affect whether or not another randomly selected M&M is brown

7). Whether or not one randomly selected M&M is brown will not affect whether or not another randomly selected M&M is brown

8). There is not a fixed number of M&Ms

Find the probability, to 4 decimal places:

It is possible when rounded that a probability is 0.0000

d) exactly none are brown.

e) exactly 64 are brown.

f) at least 56 are brown.

g) at most 61 are brown.

h) all of them are brown.

i) Is 66 an unusually high number of M&Ms that are brown in a sample of 66 M&Ms?

In: Statistics and Probability

Based on the following data for car crash deceleration measurements, do a 2-Way ANOVA test and...

Based on the following data for car crash deceleration measurements, do a 2-Way ANOVA test and determine if car size and /or country of origin make a difference in crash effects on the passenger. Use results to answer question 6 (i.e., the question that will be #6 on the test)

Car Crash Effects On Passenger (In “g”s)

      Small Medium Large Cars

Foreign 47 39 38

   45 44 40

   43 47 42

Domestic 43 43 37

   44 37 38

   42 34 33

In: Statistics and Probability

You have been given the following return​ data:                Expected Return       Year   Asset A   Asset...

You have been given the following return​ data:

               Expected Return      
Year   Asset A   Asset B   Asset C
2021          7%       8%           2%
2022          9%       6%           4%
2023          11%      4%   6%
2024          13%      2%           8%

on three assets-​A, ​B, and C over the period 2021--2024

Using these​ assets, you have isolated three investment​ alternatives:

Alternative   Investment          
1   100%   of asset A      
2   50%      of asset A and 50% of asset B
3   50%      of asset A and 50% of asset C

a. Calculate the average portfolio return for each of the three alternatives.

b. Calculate the standard deviation of returns for each of the three alternatives.

c. On the basis of your findings in parts a and b​, which of the three investment alternatives would you​ recommend? Why?

In: Finance