Help, please!
In: Computer Science
Do the problems found week 4 - Programs 1,2,3,4,5,6 and 7.
* Be sure to add your name as a cout in the first lines of each program - else 0 credit.
* Add constructors - a default and parameterized constructor to each.
* Write an .h interface and a .cpp implementation for each class
* Write an Drive/Test file that tests the constructors and functions
* Write a UML class diagram for each class
Program 4:
#define SIZE 7
#include<string>
#include <iostream>
using namespace std;
class PickColor
{
private:
string myColors[SIZE];
public:
void setElement( int index, string color)
{
myColors[index]=color;
}
void printColors()
{
cout<<"All the colors in the array are : "<<endl;
for(int i=0;i<SIZE;i++)
cout<< myColors[i]<<" ";
cout<<endl;
}
void printRandomColors()
{
cout<<"Randomly pick One color from the array is ";
cout<< myColors[(rand()%7)]<<endl;
}
};
int main()
{
cout<<"NAME-DATE";
PickColor p1;
p1.setElement(0,"red");
p1.setElement(1,"orange");
p1.setElement(2,"yellow");
p1.setElement(3,"green");
p1.setElement(4,"blue");
p1.setElement(5,"indigo");
p1.setElement(6,"violet");
p1.printColors();
p1.printRandomColors();
p1.printRandomColors();
return 0;
}
Program 5:
#include <iostream>
using namespace std;
class Rectangle {
int width, height;
public:
void set_values (int,int);
int area () {return width*height;}
};
void Rectangle::set_values (int x, int y) {
width = x;
height = y;
}
int main () {
cout<<"NAME-DATE";
Rectangle rect, rectb;
rect.set_values (2,8);
rectb.set_values (2,3);
cout << "rect area: " << rect.area() << endl;
cout << "rectb area: " << rectb.area() << endl;
return 0;
}
In: Computer Science
Cushing Corporation is considering the purchase of a new grading machine to replace the existing one. The existing machine was purchased 4 years ago at an installed cost of $ 20 comma 300; it was being depreciated under MACRS using a 5-year recovery period. (See table LOADING... for the applicable depreciation percentages.) The existing machine is expected to have a usable life of at least 5 more years. The new machine costs $ 35 comma 400 and requires $ 4 comma 500 in installation costs; it will be depreciated using a 5-year recovery period under MACRS. The existing machine can currently be sold for $ 25 comma 100 without incurring any removal or cleanup costs. The firm is subject to a 40 % tax rate. Calculate the initial investment associated with the proposed purchase of a new grading machine.
Rounded Depreciation Percentages by Recovery Year Using MACRS
for
First Four Property Classes
Percentage by recovery year*
Recovery year 3 years 5 years
7 years 10 years
1 33% 20% 14%
10%
2 45% 32% 25%
18%
3 15% 19% 18%
14%
4 7% 12% 12%
12%
5 12% 9%
9%
6 5% 9%
8%
7 9%
7%
8 4%
6%
9
6%
10
6%
11
4%
Totals 100% 100%
100% 100%
In: Finance
Numerous studies have
shown that IQ scores have been increasing, generation by
generation, for years (Flynn, 1984, 1999). The increase is called
the Flynn Effect, and the data indicate that the increase appears
to be about 7 points per decade. To demonstrate this phenomenon, a
researcher obtains an IQ test that was written in 1980. At the time
the test was prepared, it was standardized to produce a population
mean of 100. The researcher administers the test to a random sample
of 16 of today's high school students and obtains a sample mean IQ
of 110 with standard deviation of 20. Is this result sufficient to
conclude that today's sample scored significantly higher than would
be expected from a population with 100? Test this claim at the 5%
significance level.
Fill in the blanks with the appropriate responses:
Hypotheses
H0: The mean IQ score is 100
H1: The mean IQ score is Blank 1
100
(type in “less than”, “greater than”, or “not equal
to”)
Results
t = Blank 2 (enter the test statistic, use 2
decimal places)
p-value = Blank 3 (round answer to nearest
thousandth of a percent – i.e. 0.012%)
Conclusion
We Blank 4 sufficient evidence to support the
claim that the mean IQ is Blank 5 100 (p
Blank 6 0.05).
(Use “have” or “lack” for the first blank, “less than”,
“greater than” or “not equal to” for the second blank and “<” or
“>” for the final blank)
In: Math
USE C++ PLEASE AND EXPLAIN LINES AS MUCH AS POSSIBLE...THANKS IN ADVANCE...NEED THIS ASAP
An unknown number of grades as integers, but no more than 30, are to be read from the file grades.dat. You may assume each grade will be a valid value between 0 and 100 (no validation necessary) and all "grades" are out of a maximum 100 points. Output the Number of Grades read in from the file. Calculate and output the Total Points Earned. Calculate and output the Total Possible Points. (Remember each grade is out of a possible 100 points max.) Following these, output each individual grade and its percentage of the Total Points Earned. Format these so that they are lined up in two columns. The first column should be 20 characters wide and contain the grade; the second column should be 8 characters wide containing the percentage. A percent sign should be output after the second field. The percentages should be rounded to the nearest tenth. Finally, output the Final Grade as a percentage, such that it lines up with second column previously. See the sample input and output that follows:
Sample Input: assuming grades.dat contained the following
100
95
87
90
76
Sample Output:
Number of Grades: 5
Total Points Earned: 448
Max Possible Points: 500
100 20.0%
95 19.0%
87 17.4%
90 18.0%
76 15.2%
Final Grade: 89.6%In: Computer Science
Consider the market below
a. Suppose there is a $1.50 per unit tax levied on sellers. Draw the after-tax supply curve. Instructions: Use the tool provided (S2) to draw the after-tax supply curve. Be sure your endpoints are at Q = 0 and Q = 100

b. Plot the after-tax price paid by consumers and the after-tax price paid by sellers. Instructions: Use the tools provided to draw the after-tax price paid by consumers (After-tax Pc) and the after-tax price paid by sellers (After-tax Ps)
c. Draw consumer surplus, producer surplus, tax revenue, and deadweight loss after the tax Instructions: Use the tools provided to draw consumer surplus (CS), producer surplus (PS), tax revenue (Tax Revenue), and deadweight loss (DWL).
d. Deadweight loss is _______ million
e. Total surplus is _______ million
In: Economics
In: Accounting
1. Risk from investing in a security refers to:
a. volatility of security price
b. uncertainty about the future stock price
c. volatility of security returns
d. probability of loss from investing in the security
2. The expected value of annual returns of a portfolio is 10 percent with standard deviation of 20 percent. The compounded annual growth rate from investing in the portfolio is expected to be:
a. 10 percent
b. less than 10 percent
c. more than 10 percent
d. indeterminable
3. The price of a stock is $20. The stock is not expected to pay any dividend for the foreseeable future. The probability of the price next year being more than $40 is
a. 0 percent
b. the same as the return being more than $20
c. the same as the return being more than 100 percent
d. indeterminable
In: Finance
Answer the following questions on the basis of the three sets of data for the country of North Vaudeville

a. Which set of data illustrates aggregate supply in the immediate short-run in North Vaudeville?
The data in (Click to select)
Which set of data illustrates aggregate supply in the short run in North Vaudeville?
The data in (Click to select)
Which set of data illustrates aggregate supply in the long run in North Vaudeville?
The data in (Click to select)
b. Assuming no change in hours of work, if real output per hour of work increases by 15 percent, what will be the new levels of real
GDP in the right column of B?
Instructions: Round your answers to 2 decimal places.
With a price level of 110, new output =
With a price level of 100, new output =
With a price level of 95, new output =
With a price level of 90. new output =
In: Economics
Please provide with solutions and answers for
2questions
Use the table for the question(s) below.
|
Market Price |
Cash Flow in One Year |
||
|
Security |
Today |
Poor Economy |
Good Economy |
|
A |
200 |
840 |
0 |
|
B |
600 |
0 |
840 |
|
C |
??? |
840 |
4200 |
3) Suppose that security C had a risk premium of 30%, describe what arbitrage opportunity exists (if any) and how you would exploit it.
4) Suppose that a bond is purchased between coupon periods. The days between the settlement date and the next coupon period is 115. There are 183 days in the coupon period. Suppose that this bond has a coupon rate of 7.4% and there are 10 semiannual coupon payments remaining.
a) Assuming that the par value is $100, what is the “clean price” for this bond if a 5.6% discount rate is used?
) What is the accrued interest for this bond?
C) What is the “dirty price?” (i.e., invoice price)
In: Finance