Hi, I am running C# in Vis. Studio 2019 community. Trying to get my program to populate the username in the program after entered. I can enter a name and the three scores and average them as the program needs but the name is not adding next to the "Students name: " in the program. Any help would be appreciated and please place a note for what I am doing wrong. Thank you
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DoprBox08
{
class CollegeStudent
{
public static void Main(string[] args)
{
Console.Title = ("College Student ");
Console.WriteLine("Please enter your name: \nand the three scores:
");
string name = Console.ReadLine();
int midTerm1 = int.Parse(Console.ReadLine());
int midTerm2 = int.Parse(Console.ReadLine());
int finalExam = int.Parse(Console.ReadLine());
CollegeStudent s = new CollegeStudent(name, midTerm1, midTerm2,
finalExam); //Invoking the constructor
Console.WriteLine(s); //invokes ToString()
Console.ReadKey();
}
public override string ToString()
{
string str;
str = string.Format(" Student name: {0} \nSemester grade: {1}",
StudentName, SemesterGrade());
Console.WriteLine();
return str;
}
private string studentName;
private int midTerm1;
private int midTerm2;
private int finalExam;
public string StudenName
{
get { return studentName; }
set { studentName = value; }
}
public int MidTerm1
{
get { return midTerm1; }
set { midTerm1 = value; }
}
public int MidTerm2
{
get { return midTerm2; }
set { midTerm1 = value; }
}
public int FinalExam
{
get { return finalExam; }
set { finalExam = value; }
}
public object StudentName { get; private set; }
public CollegeStudent(string studentName, int midTerm1, int
midTerm2, int finalExam)
{
this.studentName = studentName;
this.midTerm1 = midTerm1;
this.midTerm2 = midTerm2;
this.finalExam = finalExam;
}
public double SemesterGrade()
{
double grade;
grade = 0.3 * MidTerm1 + 0.3 * MidTerm2 + 0.4 * FinalExam;
return grade;
}
}
}
In: Computer Science
Show your work with Excel and Solver:
A city in Ohio is considering replacing its fleet of gasoline powered cars with electric cars. The manufacturer of the electric cars claims that this municipality will experience significant cost savings over the life of the fleet if it chooses to pursue this conversion. If the manufacturer is correct, the city will save about $1.5 million. If the new technology employed within the electric cars is faulty as some critics suggest, it will cost the city $675,000. A third possibility is that less serious problems will arise and the city will break even in the conversion. A consultant hired by the city estimates the probabilities of these three outcomes are 0.30, 0.30, and 0.40, respectively. The city has an opportunity to implement a pilot program that would indicate the potential cost or savings resulting from the switch to electric cars. The pilot program involves renting a small number of electric cars for three months and running them under typical conditions. This program would cost the city $75,000. The city’s consultant believes that the results of the pilot program would be significant but not conclusive. She submits the following compilation of probabilities based on the experience of other cities to support her contention.
|
Savings |
Loss |
Breakeven |
|||
|
Indicates Saving |
0.6 |
0.1 |
0.4 |
||
|
Indicates Loss |
0.1 |
0.4 |
0.2 |
||
|
Indicates Breakeven |
0.3 |
0.5 |
0.4 |
||
For example, the first column of her table indicates that given that the conversion to electric cars actually results in a savings, the conditional probabilities that the pilot program will indicate that the city saves money, loses money, and breaks even are 0.6, 0.1, and 0.3. What actions should the city take to maximize its expected savings? When should it run the pilot program, if ever? (Note: If you set up the input section of your spredsheet in the right way, you will be able to perform all of the Bayes' rule calculations with a couple copyable formulas.)
In: Operations Management
Hi there! I can not find solution of Octave Levenspiel Chapter 26. I need it immediately. Can you please help me!Thank you.
A solid feed consisting of
20 wt% of 1-mm particles and smaller
30 wt% of 2-mm particles
50 wt% of 4-mm particles
passes through a rotating tubular reactor somewhat like a cement kiln where it reacts with gas to give a hard nonfriable solid product (SCMI reaction control, T = 4 h for 4-mm particles).
26.3. Find the residence time needed for 100% conversion of solids.
26.4. Find the mean conversion of the solids for a residence time of 15 min.
26.5. Particles of uniform size are 60% converted on the average (shrinking core model with reaction controlling) when flowing through a single fluidized bed. If the reactor is made twice as large but contains the same amount of solids and with the same gas environment what would be the conversion of solids?
26.6. Solids of unchanging size, R = 0.3 mm, are reacted with gas in a steady flow bench scale fluidized reactor with the following result. F, = 10 gmlsec, W = 1000 gm, X, = 0.75 Also, the conversion is strongly temperature-sensitive suggesting that the reaction step is rate-controlling. Design a commercial sized fluidized bed reactor (find W) to treat 4 metric tonslhr of solid feed of size R = 0.3 mm to 98% conversion.
26.7. Solve Example 26.3 with the following modification: the kinetics of the reaction is ash diffusion controlled with T(R = 100 ~m=) 1 0 min.
26.8. Repeat Example 26.4 if twice the stoichiometric ratio of gas to solid, still at C,,, is fed to the reactor.
26.9. Repeat Example 26.4 if the gas is assumed to pass in plug flow through the reactor.
In: Other
Suppose you live in a world with only
two risky assets: Amazon and Facebook (you can label these assets A
and F, respectively). Furthermore, suppose these assets have the
following expected returns and standard deviations:
|
Amazon (A) |
Facebook (F) |
|
|
Er |
14% |
5% |
|
σ |
10% |
4% |
a)If the correlation of Amazon and Facebook returns is equal to 0.3, what is the covariance of their returns?
Use Excel to calculate the expected return and standard
deviation of the risky portfolio for different combinations of
weights for A and F. In other words, set up your Excel spreadsheet
to calculate the following:
| wA | wF | ErP | Std dev P |
| -0.5 | 1.5 | ||
| -0.4 | 1.4 | ||
| -0.3 | 1.3 | ||
| -0.2 | 1.2 | ||
| -0.1 | 1.1 | ||
| 0 | 1 | ||
| 0.1 | 0.9 | ||
| 0.2 | 0.8 |
etc… (for additional combinations of weights from wA =
-0.5 to wA = 1.5)
Please include a screenshot of the filled-in table with your problem set solutions.
a)What is the optimal risky portfolio assuming rf = 2% as in part e? Label this point P on your graph from part d.(Hint: Use Solver to choose the risky portfolio weights that maximize the Sharpe Ratio of the CAL created by combining the risky portfolio and the risk-free asset.)
b) Draw in the CAL through the optimal portfolio from part a.
c) What is the expected return and standard deviation of the complete portfolio that invests y=0.4 (i.e. 40%) in the optimal risky portfolio and 1-y = 0.6 (i.e 60%) in the risk-free asset.
d) If your utility from investing in the market is given by U = Er - 12σ2 – 10σ4 , what is your optimal complete portfolio? (Hint: Use Solver to find the % of your complete portfolio in the risky asset (i.e. y) that maximizes your utility.)
e)What is a possible intuition of including the σ4 term in the utility function in part b?
In: Finance
a circular footing 10m in diameter is proposed to carry a total load of 9000 KN. The footing is to be placed at a depth of 2m below ground surface. The soil is normally consolidated silty clay with a unit weight of 20KN/m^3 and undrained shear strength of 50 KPa.
1) determine the short-term factor of safety using the General bearing capacity equation.
2) Calculate the expected consolidation settlement of the footing if the compression index is 0.2 and the initial void ratio is 1.0.
3) if the calculated settlement is not acceptable, indicate the necessary steps to be taken before construction to reduce the consolidation settlement.
In: Civil Engineering
2. Consider the equilibria shown below:
Pb3(PO4)2(s)→← 3 Pb2+(aq) + 2 PO43-(aq) Keq = 1.0 x 10-54
Pb2+(aq) + 3 OH-(aq)→← Pb(OH)3-(aq) Keq = 8.0 x 1013
Pb3(PO4)2(s) + 9 OH-(aq)→← 3 Pb(OH)3-(aq) + 2 PO43-(aq)
a) Calculate the equilibrium constant for the third equilibrium shown.
b) Calculate the equilibrium concentrations of Pb(OH)3- and of PO43- in a pH 10 solution containing the third equilibrium.
In: Chemistry
Here are data on two companies. The T-bill rate is 4% and the market risk premium is 6%.
|
Company |
$1 Discount Store | Everything $5 |
| Forecasted Return | 12% | 11% |
| Standard Deviation of Returns | 8% | 10% |
| Beta | 1.5 | 1.0 |
1) What would be the fair return for each company, according to the
capital asset pricing model (CAPM)?
2) Explain how the CAPM is used to perform this calculation and how a financial advisor would utilize this information to advise a client.
3) Discuss how changes in expected returns impact company stock prices.
In: Finance
Consider:
2CoCl2(aq) + 8NH3(aq) + H2O2(aq) + 2NH4Cl(aq) → 2[Co(NH3)5Cl]Cl2(s) + 2H2O(l)
In a 50 mL Erlenmeyer flask were combined 1.075 g of cobalt(II) chloride hexahydrate, 1.2 mL of
15 M aqueous solution of ammonia, 0.505 g of ammonium chloride, 1.0 mL of 30.0 % H2O2 (density = 1.10 g/mL), and 5.0 mL of 12 M hydrochloric acid. Reaction described by the equation above occurred, and isolated was 0.450 g of the cobalt-containing product shown. What was the percent yield of product?
In: Chemistry
During a freezing point depression study, two experiments were made with 10 grams of lauric acid. The freezing point of the lauric acid averaged 43.4 deg C. EXP 3: 1.0 grams of an unknown substance are added to the solution and a freezing point for the new solution is 41.0 deg C. EXP 4: 0.5 grams of the same unknown are added to the solution, the new freezing point is 41.6 deg C. Calculate molality of EXP 3 and EXP 4. What are the molar masses of EXP 3 and 4? What is the average molar mass of the unknown substance?
In: Chemistry
San Diego Gas & Electric provides natural gas composed of 92 mol% methane, 7.0 mol% ethane, & 1.0 mol% nitrogen. 100 mol/hr of this gas is fed to a furnace with 30% excess air. The fractional conversion of both methane and ethane is only 90% and no NOx is formed. The selectivity (CO2:CO) is 20. Using only component molar flow rates draw and label the process flow diagram, show that there are 0 degrees of freedom, and write down the appropriate equations but do not solve. Use both the molar balanxe method and atom balanxe method.
In: Chemistry