Questions
JAVA Project: Student Major and status Problem Description: Write a program that prompts the user to...

JAVA

Project: Student Major and status

Problem Description: Write a program that prompts the user to enter two characters and displays the major and status represented in the characters. The first character indicates the major and the second is a number character 1, 2, 3 or 4, which indicates whether a student is a freshman, a sophomore, junior or senior. Suppose the following characters are used to denote the majors:

M: Mathematics

C: Computer Science

I: Information Technology

Here is a sample run: Sample: Enter two characters: M3 Mathematics Junior Enter two characters: C4 Computer Science Senior Enter two characters: T3 Invalid input: Wrong major code Enter two characters: I5 Information Technology Invalid input: wrong status code

What to deliver? Your .java file including: • All the above sample runs Your code with other appropriate comments.

Hint:

1. Use charAt() and if else loops

2. Use the sample run in the instruction to test your program to make sure it is correct before you submit it.

In: Computer Science

You are saving for the college education of your two children. They are two years apart...

You are saving for the college education of your two children. They are two years apart in age; one will begin college in 7 years, and another in 10 years. You estimate your first child’s college expenses to be $30,000 per year, paid at the beginning of each college year (first payment is at year 7 and so on). You estimate your second child’s college expenses to be $50,000 per year, paid at the beginning of each college year (first payment at year 10 and so on). The annual interest rate is 8 percent. How much money must you deposit in an account each year to fund your children’s education? You will begin payments one year from today. You will make your last deposit when your oldest child enters college. Also assume that each child will take 4 years to graduate from college.

$45,714.29

$35,863.17

$25,869.35

$27,938.94

None of the above

In: Accounting

A study was conducted to determine whether the final grade of a student in an introductory...

A study was conducted to determine whether the final grade of a student in an introductory psychology course, x, is linearly related to his or her performance on the verbal ability test administered before college entrance, y. The verbal scores and final grades for 1010 students are shown in the table below.

Student Verbal Score Final Grade
1 64 76
2 50 56
3 34 43
4 38 49
5 49 59
6 56 70
7 57 68
8 72 89
9 40 44
10 60 48



Find the following rounded to three decimal places.

Part a:
The correlation coefficient
SSx=
SSy=
SSxy=
r=

Part b:
The equation of the least squares regression line
y^= + x

Part c:
The predicted final grade of a student with a verbal score of 50


Part d:
Should the regression equation be used to predict the final grade of a student with a verbal score of 100? (Type: Yes or No .)


Part e:
The coefficient of determination
R2=

In: Statistics and Probability

Two psychologists are studying the IQs of a group of business professionals. Let A be the...

Two psychologists are studying the IQs of a group of business professionals.

  • Let A be the event that a professional's IQ is greater than 115, with P(A)=16%.
  • Let B be the event that a professional's IQ is between 115 and 130, with P(B)=14%.

The IQs of different professionals are independent events. What is the probability that two random professionals will be chosen and one of their IQs is greater than 115 and the other is between 115 and 130?

Give your answer as a decimal, rounded to three decimal places.

In: Statistics and Probability

. Two firms in the same industry sell their product at $50 per unit, but one...

. Two firms in the same industry sell their product at $50 per unit, but one firm has TFC = $800 and AVC = $10 while the other has TFC’ = $1350 and AVC’ = 5.

a. Determine the breakeven quantity of each firm.

b. Find the degree of operating leverage for each firm at Q = 40 and Q =50.

In: Economics

Ex#3: Give a string of lengths, 4, 6, 8 generated by the following grammar G =...

Ex#3: Give a string of lengths, 4, 6, 8 generated by the following grammar G = (V, T, S. P).
S → 0S
S --> 0S1S
S --> λ

In: Computer Science

Using c# rewrite/edit the following program so that it runs the simulation 10,000 times (play the...

Using c# rewrite/edit the following program so that it runs the simulation 10,000 times (play the games 10,000 times) and count the number wins. Then calculate the winning probability by using the formula:

the expected winning probability = the number of wins / 10,000

using System;
class lottery
{
static void Main()
{
int n, random, choice = 1;
Random randnum = new Random();
  
while (choice == 1)
{
  
Console.Write("\nEnter a integer from 1 to 5:");
n = Convert.ToInt32(Console.ReadLine());
while (n < 1 || n > 5)
{
Console.Write("Invalid Input Enter again");
Console.Write("\nEnter a integer from 1 to 5:");
n = Convert.ToInt32(Console.ReadLine());
}
  
random = randnum.Next(1, 6);

if (n == random)
{
Console.WriteLine("You Won $5.");
}
else
{
Console.WriteLine("You lost $1");
}
Console.Write("1.To continue\n2.To exit\nEnter your choice:");
  
choice = Convert.ToInt32(Console.ReadLine());
  
}
}
}

In: Computer Science

Periodic Inventory by Three Methods Dymac Appliances uses the periodic inventory system. Details regarding the inventory...

Periodic Inventory by Three Methods

Dymac Appliances uses the periodic inventory system. Details regarding the inventory of appliances at January 1, purchases invoices during the next 12 months, and the inventory count at December 31 are summarized as follows:

Purchases Invoices
Model Inventory,
January 1
   1st    2nd    3rd    Inventory Count,
December 31
A10 __ 4 at $ 44 4 at $ 47 4 at $ 50 5
B15 8 at $ 94 4 at 85 3 at 91 6 at 98 7
E60 3 at 69 3 at 59 15 at 62 9 at 64 5
G83 7 at 221 6 at 229 5 at 239 10 at 238 9
J34 12 at 79 10 at 81 16 at 88 16 at 89 13
M90 2 at 116 2 at 118 3 at 136 3 at 138 5
Q70 5 at 163 4 at 173 4 at 178 7 at 183 8

Required:

1. Determine the cost of the inventory on December 31 by the first-in, first-out method.

If the inventory of a particular model comprises one entire purchase plus a portion of another purchase acquired at a different unit cost, use a separate line for each purchase. If units are in inventory at two different costs, enter the units PURCHASED MOST RECENTLY first.

Dymac Appliances
Cost of the Inventory-FIFO Method
December 31
Model Quantity Unit Cost Total Cost
A10 $ $
A10
B15
B15
E60
G83
J34
M90
M90
Q70
Q70
Total $

2. Determine the cost of the inventory on December 31 by the last-in, first-out method.

If the inventory of a particular model comprises one entire purchase plus a portion of another purchase acquired at a different unit cost, use a separate line for each purchase. If units are in inventory at two different costs, enter the OLDEST units first.

Dymac Appliances
Cost of the Inventory-LIFO Method
December 31
Model Quantity Unit Cost Total Cost
A10 $ $
A10
B15
E60
E60
G83
G83
J34
J34
M90
M90
M90
Q70
Q70
Total $

3. Determine the cost of the inventory on December 31 by the weighted average cost method.

Dymac Appliances
Cost of the Inventory-Weighted Average Method
December 31
Model Quantity Unit Cost Total Cost
A10 $ $
B15
E60
G83
J34
M90
Q70
Total $

4. would be preferred for income tax purposes in periods of rising prices.

Previous

In: Accounting

The home run percentage is the number of home runs per 100 times at bat. A...

The home run percentage is the number of home runs per 100 times at bat. A random sample of 43 professional baseball players gave the following data for home run percentages.

In: Statistics and Probability

The energy produced by a 22.1 W bulb is harnessed and used to lift a 88.5...

The energy produced by a 22.1 W bulb is harnessed and used to lift a 88.5 kg weight. If there are no frictional losses and the bulb runs for 1,281 seconds, how high will the weight rise, in m?

In: Physics