2.CSE 1300
Problem Solving Practice Conditional Statements
Question 1: Student Fees
All KSU students pay fees in addition to their tuition.
Using the code
...
nts pay fees in addition to their tuition.
Using the code provided below as a starting point, write a conditional statement that determines how much a student will pay in fees.
• Students registered for 1 – 4 hours pay $843 in student fees.
• Students enrolled in 5 or more hours pay $993 in student fees.
The program should also display a message to students who have not enrolled in any classes: “You are not enrolled in any classes right now.”
NOTE: You must use the variables included in the code snippet get credit for this question.
import java.util.Scanner;
class Main {
public static void main(String[] args) {
int creditHours;
int fees = 0;
Scanner myScanner = new Scanner(System.in);
System.out.print("Please enter the number of credit hours you are taking this term: "); creditHours = myScanner.nextInt();
myScanner.close();
//YOUR CODE GOES HERE
} }
Break the Problem Down
Answer the following questions, then use the information to write your code.
What are the inputs in the pseudocode above? (INPUT)
What are we storing in the pseudocode above? (MEMORY)
What calculations are needed? (PROCESSES)
What needs to be displayed to the user?
(OUTPUT)
How many conditions are there in your problem statement?
What are they?
Does something need to happen if the condition(s) are not met?
What type of conditional statement do you need?
Solution in Java
Problem 2: Block Tuition
The cost of KSU’s tuition is determined by the number of credit hours a student enrolls in.
Using the chart below, write a conditional statement (ONLY) that sets the value of a tuition variable to what that student will owe.
NOTE: For this problem you can assume that all students are enrolled in a minimum of 12 hours.
Number of Credit Hours 12
13
14
15 or more
Cost (in USD) $2224 $2410 $2595 $2718
Break the Problem Down
Answer the following questions, then use the information to write your code.
What do we need to store? (MEMORY)
What are the inputs in the problem statement above? (INPUT)
What calculations are needed? (PROCESSES)
What needs to be displayed to the user?
(OUTPUT)
How many conditions are there in your problem statement?
What are they?
Does something need to happen if the condition(s) are not met?
What type of conditional statement do you need?
Solution in Java
Problem 3: Class Standing
Undergraduate students will be classified based on the number of earned institutional hours.
• Freshman:
• Sophomore:
• Junior:
• Senior:
0 - 29 hours
30 - 59 hours 60 - 89 hours
90 hours or more
Write a complete program that prompts the user for the number of credit hours they have completed. Write a conditional statement that prints out their class standing based on the information they provided.
Sample Output
Break the Problem Down
Answer the following questions, then use the information to write your code.
What do we need to store? (MEMORY)
Please enter the number of credit hours you have earned: 29 You are a freshman.
What are the inputs in the problem statement above? (INPUT)
What calculations are needed? (PROCESSES)
What needs to be displayed to the user?
(OUTPUT)
How many conditions are there in your problem statement?
What are they?
Does something need to happen if the condition(s) are not met?
What type of conditional statement do you need?
Solution in Java
Problem 4: Maximum Course Load
KSU’s policy on maximum course loads during the academic year is as follows:
A student in good standing may register for up to 18 hours. The Registrar may approve up to 21 hours for students with an institutional GPA of 3.5 or higher. Students
Write a complete program that prompts the user for the number of credit hours they have signed up for. Write the necessary conditional statement(s) to address the stipulations in KSU’s policy. Once the maximum number of hours is determined, display a message to the user that states “You may enroll in X credit hours this semester.” where X is the number of credit hours determined by your program.
Sample Output
Break the Problem Down
Answer the following questions, then use the information to write your code.
What do we need to store? (MEMORY)
Please enter your GPA: 3.75
You may enroll in up to 21 credit hours this semester.
What are the inputs in the problem statement above? (INPUT)
What calculations are needed? (PROCESSES)
What needs to be displayed to the user?
(OUTPUT)
How many conditions are there in your problem statement?
What are they?
Does something need to happen if the condition(s) are not met?
What type of conditional statement do you need?
Solution in Java
Problem 5: First-Year Seminar
All first-year full-time students entering Kennesaw State University with fewer than 15 semester hours are required to complete a First-Year Seminar. Students with 30 or more credit hours are not eligible to enroll in a First-Year Seminar.
Write a complete program that prompts the user for the number of credit hours they have completed. Write the necessary conditional statement(s) to address the stipulations in KSU’s policy.
When you run your program, it should display one of the following messages to the screen:
• You must enroll in First-Year Seminar.
• You do not have to take First-Year Seminar.
• You are not eligible for First-Year Seminar.
Sample Output
Break the Problem Down
Answer the following questions, then use the information to write your code.
What do we need to store? (MEMORY)
Enter the number of credit hours have you completed: 30
You are not eligible for First-Year Seminar.
What are the inputs in the problem statement above? (INPUT)
What calculations are needed? (PROCESSES)
What needs to be displayed to the user?
(OUTPUT)
How many conditions are there in your problem statement?
What are they?
Does something need to happen if the condition(s) are not met?
What type of conditional statement do you need?
Solution in Java
View More
4.Hi, can you help me with this discussion board?
1.Describe the use of [a] cowrie shells in Africa OR [b]
...
frica OR [b] wampum in North America as money; including, in particular, how this use changed following the arrival of the white man.
2.Describe [a] the use of the U.S. Dollar as a store of value in two to four other countries OR [b] Bitcoin.
3. Describe the process by which this country used to have a pattern involving bank panics and business cycles.
4.At this time, the breakeven expected inflation rate is 2.2 percent. What are [a] good reasons to suspect this is too high AND [b] too low?
5.What do the successes of Oprah Winfrey, Kanye West, and Michael Jordan in becoming billionaires say about the knowledge of saving and investment of some Americans?
View More
5.2)Two books are accelerating to the right on a frictional surface and the coefficient of kinetic friction between the floor
...
ction between the floor and book is µk. Using the information given in the figure:
(a) draw free body diagrams for both the books, and also for the combined system (of mass m1+m2),
(b) find acceleration of the books along horizontal direction, and
(c) find the magnitude and direction of the force exerted by the left book on the right book.
3.A car of mass 1500-kg enters a circular path at point P and leaves at point Q (see the figure) at constant speed of 5.0m/s, and the frictional force acting on its tires is 2500-N.
a) how long it takes to reach point Q from point P, and
b) what should be the minimum value of the coefficient of static friction between the tires and the road?
4)In an elevator which is accelerating downward at 2.5ms−2 , a 25-kg block hangs from a spring attached to the ceiling of the elevator. If spring gets stretched by 0.15m, find its spring constant.
View More
6.Can domestic dogs understand human body cues such as leaning? The experimenter leaned toward one of two objects and recorded
...
two objects and recorded whether or not the dog being tested correctly chose the object indicated. A four-year-old male beagle named Augie participated in this study. He chose the correct object 42 out of 70 times when the experimenter leaned towards the correct object.
(a) (2 points) Let the parameter of interest, π, represent the probability that the long-run probability that Augie chooses correctly. Researches are interested to see if Augie understands human body cues (better than gussing).
Fill in the blanks for the null and alternative hypotheses.
H0 : Ha :
(b) (6 points) Based on the above context, conduct a test of significance to determine the p-value to investigate if domestic dogs understand human body cues. What conclusion will you draw with significance level of 10%? (If you use an applet, please specify which applet you use, and the inputs.)
(c) (5 points) Based on the above context, conduct a test of significance to determine the p-value to investigate if domestic dogs understand human body cues. What conclusion will you draw with significance level of 5%? (If you use an applet, please specify which applet you use, and the inputs.)
(d) (2 points) Are your conclusions from part (b) and (c) the same? If they are different, please provide an explanation.
(e) (5 points) Shown below is a dotplot from a simulation of 100 sample proportions under the assump- tion that the long-run probability that Augie chooses correct is 0.50. Based on this dotplot, would a 90% confidence interval for π contain the value 0.5? Explain your answer.
(f) (4 points) Compute the standard error of the sample proportion of times that Augie chose the object correctly.
1
(g) (5 points)
(h) (3 points) question?
(i) (4 points)
(j) (4 points) A.
B. C.
Construct an approximate 95% confidence interval for π using the 2SD method. What is the margin of error of the confidence interval that you found in the previous
How would you interpret the confidence interval that you found in part (g)?
Which of the following is a correct interpretation of the 95% confidence level?
If Augie repeats this process many times, then about 95% of the intervals produced will capture the true proportion of times of choosing the correct objective.
About 95% times Augie chooses the correct objective.
If Augie repeats this process and constructs 20 intervals from separate independent sam- ples, we can expect about 19 of those intervals to contain the true proportion Augie chooses the correct objective.
(k) (4 points)
object 21 out of 35 times.
Conjecture how, if at all, the center and the width of a 99% confidence interval would change with these data, compared to the original 2SD 95% confidence interval.
The center of the confidence interval would . The width of the confidence interval would .
(l) (4 points) Suppose that we repeated the same study with Augie, and this time he chose the correct object 17 out of 35 times, and we also change the confidence level from 95% to 99%. Conjecture how, if at all, the center and the width of a 99% confidence interval would change with these data, compared to the original 2SD 95% confidence interval.
Suppose that we repeated the same study with Augie, and this time he chose the correct
The center of the confidence interval would The width of the confidence interval would
.
.
View More
7.1) Which of the following statements about scientific methods / theories is correct?
(1/0/0)
a) A scientific theory must be able to
...
a) A scientific theory must be able to be proven.
b) A scientific theory has been derived from known facts and always applies.
c) A scientific method should give different results depending on who performs the method.
d) Knowledge of our surroundings usually emerges through an interplay between theory and experiment.
2) The sides of a straight block are measured to 3,202 cm; 0.0012 cm and 11.2 cm, respectively. Calculate the volume of the straightening block and enter it with the correct number of value digits.
(2/0/0)
Number of words: 0
3) A 9.2 dm long and evenly thick rod rests on a support. 0.55 dm from one end, a dynamometer is hung so that the rod will hang horizontally. Then the dynamometer shows 4.4 N. How much does the bar weigh?
(1/1/0)
Number of words: 0
4) A bar AB that is homogeneous and evenly thick has a length of 2.70 m and is rotatable about an axis at A. The bar weighs 25 kg and is kept in equilibrium by a force F which has its point of attack in B. is 45 degrees. How big is the force F?
(1/1/0)
Saved!
25 * 9.82 = 245.5 N
Number of words: 6
5) A trolley rolls at a constant speed to the right. On the cart is an upward cannon that suddenly shoots a bullet. The carriage continues to the right with the same speed as before. Where does the bullet end up when it falls? For a detailed reasoning.
(1/1/1)
Number of words: 0
6) A river is 200 m wide. The water in the river flows at a speed of 2.5 m / s. A motorboat steers across the river at its maximum speed, which in stagnant water is 5.0 m / s. The boat is constantly heading perpendicular to the banks of the river. Where does the motorboat land on the other shore?
(2/0/0)
Number of words: 0
7) A ball with a mass of 2.0 hg moves at a constant speed in a circular path. The radius of the track is 1.5 m and it takes the ball 3.0 seconds to move one turn. How big is the centripetal force?
(1/1/0)
Number of words: 0
8) A bullet moves at a constant speed. Can we then safely say that the resultant of the forces acting on the bullet is zero? Motivate and discuss your answer.
(0/1/1)
Number of words: 0
9) A conductor is located between the poles of a permanent magnet. The current in the conductor goes in the direction of the plane of the paper (away from the reader). How is the force acting on the leader directed?
(1/0/0)
a) To the right of the figure
b) To the left in the figure
c) Downwards in the figure
d) Upwards in the figure
10) Protons enter horizontally from the left between two large metal plates at a speed v = 0.80 Mm / s. The plates are connected to a voltage source with the pole voltage U. Between the plates there is a homogeneous magnetic field with a flux density of 38 mT directed perpendicular to the plane of the paper. The distance between the plates is 1.5 cm. They want the protons to continue with unchanged direction and speed between the plates. Which of the plates should be connected to the positive pole of the voltage source and how large should the voltage U be?
(0/2/0)
Number of words: 0
11) The magnetic flux Φ through a 700-speed coil decreases linearly with time according to the diagram below. Calculate the voltage across the coil at time t = 1.0 ms.
12) The current in a coil with an inductance of 35 mH has a growth rate of 6.2 A / s at a given moment. What is the instantaneous value of the ems induced in the coil?
View More
9.dehydrated cobalt (ii) chloride
Be sure to include subheadings (see bold text below) formulas, and units.
Chemical Equation: Write a generic
...
units.
Chemical Equation: Write a generic chemical equation for the dehydration of cobalt (II) chloride ∙ x hydrate (include the state symbols of the reactant and two products). [T2]
Mass of Reactants and Products:
a) Calculate the initial mass of the hydrated cobalt (II) chloride. [T1]
b) Calculate the final mass of the anhydrous cobalt (II) chloride remaining in the cruiio8icible. [T1]
c) Calculate the mass of water given off by the sample of hydrated cobalt (II) chloride. [T1]
Moles of Products:
a) Calculate the moles of anhydrous cobalt (II) chloride remaining in the crucible. [T1]
b) Calculate the moles of water released from the hydrate. {T1]
4. Mole Ratio
a) Create an experimental mole ratio between the b) and a). [T1]
5. Formula of Hydrate: State the chemical formula you have determined for this hydrate.
Round the formula to the closest whole number value for x. [T1]
Discussion/Conclusion Questions: [T6]
Based on the chemical formula of the hydrate, calculate the percentage composition (percent by mass) of the hydrated cobalt (II) chloride. Remember to determine the percentage of each element (Co, Cl, H, and O). [T2]
A possible source of systematic error in this experiment is insufficient heating. Suppose that the hydrate was not completely converted to the anhydrous form. Describe how this would affect: the calculated percent by mass of water and the experimental molecular formula (i.e. would x be higher, lower or the same).
Suppose a student spilled some of the hydrated cobalt (II) chloride. Describe how this would affect the calculated percent by mass of water (would it be higher, lower or the same) and the experimental chemical formula of the hydrate. [T2]
View More
10.The unit price of market goods is $1. Each person has 8 hours to work each day.
Another couple, Sylvan and
...
van and Alex, have the same productivities: Sylvan is identical to Rajan, while Alex
and Esther are identical.
Esther and Rajan both engage in market work. Sylvan works full time at home, so only Alex works in the
market.
a) Given this information, which couple has the higher opportunity cost of home produced goods?
Explain how you determined this. You can add a diagram if that helps, but you are not required
to include one.
b) Can you determine which couple has the higher utility? Explain why or why not.
Suppose now that value of market production for both Alex and Esther increased to $12/per hour.
c) Explain the change in the household joint production possibility frontier generated by this
change.
d) Explain what would happen to each couple’s choice of both household and market produced
goods, using an analysis by means of income and substitution effects.
e) What changes in time allocation for each couple that would be necessary to produce and
consume this new bundle? Briefly explain your reasoning.
View More
11.URGENT PLZZZ PLZZ ANSWER
Coupon redemption, a strategy for spurring sales, is the variable of interest to this study.
Needless to
...
erest to this study.
Needless to say, this sales strategy will be effective when the distribution channels for the product in question are well planned, when there is sufficient advertising to let the consumers know about the promotion, when the package clearly indicates the coupon redemption scheme with the expiration date, if any, and the packaging of the product is of the right size (neither too big nor too small to serve the needs of the consumer). Of course, all these factors will not help, unless there is an established frequent need for the product for consumers.
Develop a theoretical framework for the above mentioned scenario.
(5 marks)
Ques. 14
Read the following information identify the concepts and develop a conceptual model for the scenario below.
Incidence of smoking in movies has started to increase again, after having declined for several decades. According to the National Cancer Institute smoking is seen in at least three out of four contemporary box office hits. What's more, identifiable cigarette brands appeared in about one-third of all movies in 2019. Exposure to smoking in movies is an important predictor of adolescent smoking initiation: smoking in movies has been shown to affect adolescents' intentions to start smoking. In turn, the intentions to start smoking are determined by a more positive attitude toward smoking after seeing a film character smoke. Recent research has revealed that the relationship between seeing a film character smoke and the attitude toward smoking is stronger when a person's identification with a film character increases. These findings are consistent with social learning theory, which predicts that attitudes and behaviors are modeled by observing the behaviors of others.
HELP URGENT PLZ
RESEARCH SUBJECT
QUESTION IS NOT INCOMPLETE OR MISSING
1)Dorothy Dunning , Chief Production Manager , was on top of the world just two years ago . In her nontraditional job , she was cited to be the real backbone of the company , and her performance was in no small measure responsible for the mergers the institution was contemplating with other well - known global corporations . Of late though , the products of the company had to be recalled several times owing to safety concerns . Quality glitches and production delays also plagued the company . To project a good image to consumers , Dunning developed a very reassuring web site and made sweeping changes in the manufacturing processes to enhance the quality of the product , minimize defects , and enhance the efficiency of the workers , A year after all these changes , the company continues to recall defective products !
Do you think so research might have solved the Dorothy problem , if yes how ? (Be specific while answering and plan the body of writing recalling the concept of research ) 3marks
2) The GAAP ( Generally Accepted Accounting Principles ) do an unacceptable job of accounting for the principal activities of the Information Age companies . Today , investors are in the dark because the accounting is irrelevant . The basic purpose of accounting is to provide useful information to help investors make rational investment , credit , and similar decisions , but today's most important assets and activities - intellectual capital and knowledge work are totally ignored . Professor Robert A. Howell wants to reform the accounting system with the goal of making clear the measurement of how companies produce cash and create value .
How would you define the problem in the following case ? 2 MARKS
View More
15.A bank claims that omitting the annual credit card fee for customers who charge at least $2500 in a year
...
year will increase the amount charged on its credit card. The bank makes this offer to a random sample of 225 of its credit card customers. It then compares how much these customers charge this year with the amount that they charged last year. The mean increase in the sample is $560, with sum of squares SS= $1,417,250. Is there significant evidence at 1% level that the mean amount charged increases under the no-fee offer? First, in the blank below report the observed value of the test statistic (e.g., observed z, observed t, or observed χ2 you will use for hypothesis testing
2. Enter the critical value for the statistic and degrees of freedom. Do we reject H0 or fail to reject
View More
23.With her bare hands and her arms rigidly extended, a girl catches a 0.16kg baseball coming directly at her at
...
at her at speed of 40m/s. She shouts, “Youch!’ because the fast-moving ball hurts her hands. She quickly learns how to move her arms and hands along with the ball as she catches it to reduce the magnitude of the impulse force. If the contact time of the collision is increased from the original value of 3.5ms with no arm or hand movement, to 8.5ms in the manner described, how do the magnitudes of the average impulse forces compare? Calculate both of these average forces.
View More
25.
Value: 1
equation image indicator
a. (x - 2)2(x - 3)2
b. (x2+ 4)(x2+ 9)
c. (x - 2)(x +
...
2)(x - 3)(x + 3)
d. (x2 - 4)(x2+ 9)
Value: 1
The table below shows the cost of purchasing a standard stapler at five office supply stores, A through E. If the median cost of purchasing a standard stapler for these stores was $17.99, which of the following could NOT have been the cost of the stapler for Store A?
staplergraph.jpg
a. $19.95
b. $18.95
c. $16.95
d. $19.25
Value: 1
If equation image indicator then x =
a. 7
b. 1/5
c. 5
d. 1/7
Value: 1
A six−sided die, with sides numbered 1,2, 3,4,5, and 6, is tossed. What is the probability of tossing a number less than three?
a. 1/3
b. 0
c. 1/2
d. 1/4
Value: 1
If 6m + 4 = 8m, then 4m =
a. 6
b. 2
c. 8
d. 4
Value: 1
In the xy-plane, what is the y-intercept of the graph of the equation equation image indicator?
a. 2
b. 4
c. 16
d. There is no y-intercept.
Value: 1
Which of the following equations has both 2 and −4 as solutions?
a. x2 + 6x + 8 = 0
b. x2 - 2x - 8 = 0
c. x2 + 2x - 8 = 0
d. x2 - 2x + 8 = 0
Value: 1
The perimeter of a square is 20 ft. If you increase the length of the square by 2 feet and decrease the width by 1 foot, what is the area, in square feet, of the new figure?
a. 22
b. 28
c. 35
d. 40
Value: 1
(3x-2y4)-3 =
a. equation image indicator
b. equation image indicator
c. equation image indicator
d. equation image indicator
Value: 1
A softball is tossed into the air upward from a first floor balcony. The distance of the ball above the ground at any time is given by the function, distance function.png, where h(t) is the height of the softball above the ground (in feet) and t is the time (in seconds). What was the maximum height, in feet, of the softball above the ground after it was thrown?
a. 28
b. 30
c. 32
d. 34
Value: 1
A group of 100 people, some students and some faculty, attended a museum opening. Each student paid $10 per person for entrance to the museum and each of the faculty paid $25 per person for entrance. If the total paid, for all 100 people, was $1300, how many students attended the museum opening?
a. 20
b. 50
c. 70
d. 80
Value: 1
The ratio of Sam's age to Hank's age is 5 to 3. If the sum of their ages is 24, how old is Hank?
a. 21
b. 15
c. 19
d. 9
Value: 1
In the xy−coordinate plane shown below, point P has coordinates (8, −6). Which of the following is an equation of the line that contains points O and P?
O and P graph.jpg
a. equation image indicator
b. equation image indicator
c. equation image indicator
d. equation image indicator
Value: 1
The variables x and y are inversely proportional, and y = 2 when x = 3. What is the value of y when x = 9?
a. 54
b. 6
c. 2/3
d. 3/2
Value: 1
A farmer has 1235 trees to be planted on a rectangular parcel of land. If there are 24 trees planted in each row and each row must be complete before it is planted, how many trees will be left over after planting?
a. 21
b. 11
c. 0
d. 55
View More
26.Question 1: suppose the dealer has an an Ace showing, you have a 3 and an 8 in your hand,
...
r player at the table is showing a 5 and 6. Compute the expected value of a one-dollar insurance bet under these circumstances
Question 2: Suppose that( perhaps after being hit one or more times) you have cards addings up to 18. Using the table provided in these notes, compute the probability that you will lose, and the probability that you will tie.
Question 3: The "Royal Hand" consists of King and Queens of the same suit. Compute the probability of being dealt a Royal Hand in the first two cards.
Question 4: Compute the probability that you will initially be dealt two cards adding up to exactly 20. ( First think about how many ways two cards can up to 20 in blackjack.)
Question 5: You have two 9s in your hand. The dealer is showing a 7, and the only other player at the table is sowing a King and a 9. If you ask to be hit, what is the probability that you will bust on the next card?
View More