1.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
2.Please review the attached finding sheet and complete the questions. Note - this is two documents. Submit this in a
...
ubmit this in a word version of the document using the provided question sheet, just add your name to the top. The answers provided should be short and concise to make understandability easy for the reader. Assume the reader does not know anything about this finding and that you are communicating this information to them. The reader does not have a college background and is not familiar with technical terms.
If you complete review of the finding sheet, then attach your review in a word document with notes (or comments) directly in the document provided. Whenever you complete a review you should be documenting that review, not just the answers.
View More
3.AP Chem AB FRQ
Question 1
A sample consisting of 50. mL of 0.400 M solution of the acid, HClO4, is titrated
...
titrated with a 0.200 M solution of the base, LiOH.
Write the balanced chemical reaction for neutralization reaction:
HClO4 (aq) + LiOH (aq) → LiClO4 (aq) + H2O (l)
Write the NET ionic equation for the neutralization reaction.
OH⁻ (aq) + H⁺ (aq) → H2O (l)
Compute the pH of the titration solution. Show your work
i) before any of the base is added
ii) after 25. mL of base is added
iii) after 50. mL of base is added
A student performs the titration with the same chemicals but with smaller volumes of each chemical . Which of the following titration curves could represent the titration. Explain
A because this entails a strong acid and a strong base.
Question 2
A student performs a titration of an unknown acid with a strong base and gets the following titration curve:
a) The student consults the list of pKa of acids shown below. If the acid is listed in the table below, which is the most likely identity of the unknown acid? Explain.
Acid
Ka
HF
7.2 x 10-4
CH3COOH
1.8 x 10-5
H2CO3
4.3 x 10-7
HBrO
2.0 x 10-9
The unknown acid is HBrO because the calculated Ka is in between 50^-4 and 50^-6 and 2.0 x 10^-9 lies in between them.
b) What is the initial molarity of the acid?
10^-3 = 0.001M
Question 3
a) Describe the components and the composition of an effective buffer solution. Explain how the components of the buffer allow the buffer to maintain its pH.
An effective buffer solution has a weak acid and its conjugate base or a weak base and its conjugate acid. A buffer solution is most effective when the ratio of its component concentrations is close to 1, also when the pH is equal to the pka of the acid.; The components of the buffer allow the buffer to maintain its pH because buffers can absorb excess H+ions or OH– ions.
An employer is interviewing four applicants for a job as a laboratory technician and asks each how to prepare a buffer solution with a pH of 5.0. The following constants may be helpful: hydrazoic acid, pKa = 4.74 Boric acid, pKa = 9.23
Archita A. says she would mix equal molar solutions of hydrazoic (HN3) and sodium azide (NaN3) solutions.
Bradley B. says she would mix equimolar Boric acid (H3BO3) and HCl solutions.
Carlos C. says he would mix equimolar Boric Acid (H3BO3) and sodium dihydrogen borate (NaH2BO3) solutions.
Delia D. says he would mix equimolar hydrazoic Acid (HN3) and NaOH solutions.
b) Which of these applicants has given an appropriate procedure? Explain your answer
Delia because she is using Sodium hydroxide which results in a pH of 5. NaOH is a strong base and in order to have an effective buffer a weak acid must be incorporated which is the HN3.
c) Explain what is wrong with the erroneous procedures.
The rest all incorporate a strong acid and a strong base or a weak acid and a weak base which don’ result in an effective buffer.
d) The applicants have access to the 1 Liter volumes of each of the solutions listed above. They have access to graduated cylinders. In order to make 1.0 Liter of the correct 5.0 buffer solution, what volumes of the two chemicals must be mixed?
View More
5.MUST access/view this website link to help me solve this one big lab question:
...
https://opengeology.org/historicalgeology/virtual-field-experiences-vfes/vfe-glaciers/#Continental_glaciation_in_LiDAR And go/view liDAR image map of Scandinavia below the heading “Continental glaciation in liDAR” to view the image portion of the Scandanivia map on that site. I need help for this one final question regarding this liDAR image of Scandinavia for this lab assignment I’m doing to “Identify one of each of the following geomorphic 5 features below each associated with continental glaciation (TAKE a screenshot on your PC of an example of each from this liDAR map image of Scandinavia, and send those 5 images, labeling key features of the image, and put all 5 screenshot images of these below features with their labeled annotated key features in a Word Doc or PDF to SEND to me). From accessing this website link and using the liDAR map image of Scandinavia take take these 5 key feature screenshots, HERE are there 5 required features BELOW required to screenshot with key features labeled/annotated to take one of each on your PC( press “Fn” + “PrtScr” to screenshot images on your Windows PC(don’t know how on Mac PC) or use/downloa snippet program to take computer screenshots of these 5 features):
glacial striations
terminal moraine
outwash delta
esker
kettles SEE attached photo file for same directions for this question as typed here, but for more better simpler clarity to read the same directions as typed here on this attached file. ALSO THIS Assignment is really due by 11:59 pm tonight 11/7, but I want it done at least by 7 or 8 pm today 11/7. Thanks, please try to help me ASAP, I’m struggling.
View More
7.1. Which visual representation is false? *
A
B
Option 4
2. Choose the pair of numbers √15 is between. *
A
B
D
3. Which shows the
...
etween. *
A
B
D
3. Which shows the following numbers in order from least to greatest? *
B
C
D
4. Which is the best name for this group of numbers? *
A
B
D
5. Which point on the number line best represents √3? *
A
B
C
For question 6 and 7, write each number in either scientific notation or standard notation. 6. The diameter of Mercury is 4879 kilometers. *
7. The diameter of a bacterial cell called a mycoplasma is about 2 x 10-7 meter. *
8. In which group are the numbers in order from greatest to least? *
B
C
D
9. Greg found the length of a hypotenuse of a right triangle to be √90 feet. Between which two integers does √90 lie? *
A
B
C
10. Which is the best name for this group of numbers? *
A
C
D
11. The water levels of five Texas lakes were measured on the same day in 2010. The table below shows the number of feet above or below normal level for each lake. Which list shows the numbers in the table from greatest to least? *
B
C
D
12. Which numbers from this list are less than -0.94? *
B
C
D
13. The length of a micrometer is approximately 0.00003937 inch. How would you express this in scientific notation? *
A
B
C
14. The National Park Service manages approximately 84,000,000 acres of federal land. How would you express this number using scientific notation? *
B
C
D
15. Seismosaurus is the longest known dinosaur. It measured 1800 inches. How far would 3000 Seismosaurus dinosaurs span if they were placed head to tail? Write your answer in scientific notation. *
View More
10.I have a research project and need help, this is the data set description:
Health researchers have identified a rise in
...
identified a rise in contacting STIs (sexually transmitted infections) among young adults and are interested in understanding why. The researchers measured several variables related to condom use including: likelihood of using condoms in the future, previous use of condoms, perceived ability for self-control in sexual relationships, and perceived risk for contracting STIs.
Method
This study is looking to understand why there has been a rise in sexually transmitted infections. Participants were asked to answer 4 different questions and the results were analyzed.
Participants: Participants include 100 men and women ages ranging from 18-38. The mean age in this experiment is 24 years old and there is an equal amount of men and women.
Name of Independent Variable(s): Provide a description of all independent (or grouping) variables, including their levels. Each variable should be described separately and the name of each new variable should be indented and underlined.
Name of Dependent Variable: Provide a description of the dependent variable, including how it was operationalized.
Following the description of all your variables you should clearly state (in a sentence) the research question you intend to investigate. Next, you should say something along the lines of, “This research has the following hypotheses:
Ha: State the alternate hypothesis in BOTH conceptual and statistical form.
H0: State the null hypothesis in BOTH conceptual and statistical form
Also I need to know what analysis to complete in spss
View More
11.ATTACHED ARE GRAPHS
QUESTION 1
Q1 to Q4
The job satisfaction for the four occupational groups were used (lawyer, physical therapist, cabinetmakers, and
...
oups were used (lawyer, physical therapist, cabinetmakers, and system analysts). The results obtained for a sample of 5 individuals from each groups. Using the "ANOVA Output" below, please answer the following questions ( Use the significance level 5%).
Q1. The value of the test statistic is ____________
QUESTION 2
Q2. The p- value of the test is _________________
QUESTION 3
Q3. At the 5% significance level, the null hypothesis is rejected if the value of the F statistics is >= _________________
QUESTION 4
Q4. Interpret the ANOVA result at the 5% significance level. Is there any difference in the job satisfaction among the four occupational groups? Answer either yes or no. Explain the reason of your answer statistically.
QUESTION 5
Data from a Trucking Company is Southern California were utilized to examine the relationship among total daily travel time (y), miles to traveled (X1), and the number of deliveries (x2). Based on the "Regression Output" below, please answer the following questions.
Q5. The number of sample used in this regression analysis is______________
QUESTION 6
Q6. What is the value of the coefficient of determination?
QUESTION 7
Q7. What is the F test statistic value for the regression model significane test?
QUESTION 8
Q8. What is the predicted travel time for X1 =95, and X2= 6?
QUESTION 9
Q9. Is X2 (number of deliveries) related to Y (travel time)? Answer either yes or no. Explain the reason of your answer statistically.
ATTACHED ARE GRAPHS
View More
13. When to balance dice are rolled, there are 36 possible outcomes. Find the probability that the sum is
...
is a multiple of three or greater than eight.
A certain game consist of rolling a single fair die and pays off as follows nine dollars for a six, six dollars for a five, one dollar for four and no payoffs otherwise.Find the expected winnings for this game.
A fair die is rolled four times. A 6 is considered success While all other outcomes are failures find the probability of three successes.
A pet store has nine puppies including 4 poodles 3 terriers and 2 retrievers. If Rebecca an errand in that order each select one puppy at random without replacement find the probability that Aaron select a retriever given that from last Rebecca selects a poodle.
Experience shows that a ski lodge will be for (166 guests) if there is a heavy snowfall in December, well only partially full (52 guests) With a light snowfall. What is the expected number of guests if the probability for a heavy snowfall is 0.40? I assume that heavy snowfall and light snowfall are the only two possibilities.
A pet store has six puppies Including two poodles two Terriers and to retrievers. If Rebecca and Aaron in that order each select one puppy random with replacement (They both may select the same one) Find the probability That Rebecca selects a terrier and Aaron selects a retriever.
Three married couples arrange themselves randomly in six consecutive seats in a row. Determine (A) the number of ways the following event can occur, And (B) the probability of the event. (The denominator of the probability fraction will be 6!=720, The total number of ways to arrange six items ). Each man was that immediately to the right of his wife.
A coin is tossed five times. Find the probability that all our heads. Find the probability that at least three are heads.
A certain prescription drug is known to produce undesirable facts and 35% of all patients due to drug. Among a random sample of a patient using a drug find the probability of the stated event. Exactly 5 have undesired effects.
10,000 raffle tickets are sold. One first prize of 1600, for second prizes of 800 each, And 9/3 prizes of 300 each or to be awarded with all winners selected randomly. If you purchase one ticket what are your expected winnings.
Suppose a charitable organization decides to Raise money by raffling A trip worth 500. If 3000 tickets are sold at one dollar each find the expected net winnings for a person who buys one ticket. Round to the nearest cent
Three men and seven women are waiting to be interviewed for jobs. If they are selected in random order find the probability that all men will be interviewed first
A fair diet is rolled. What is the probability of rolling on our number or a number less than three.
The pet store has 15 puppies, including five poodles, five Terriers, and five retrievers. If Rebecca and Aaron, in that order, select one puppy at random without replacement, find the probability that both select a poodle
Beth is taking a nine question multiple-choice test for which each question Has three answer choices, only one of which is correct. Beth decides on answering By rolling a fair die And making the first answer choice if the die shows one or two, The second If the die shows three or four, and the third if the die shows five or six. Find the probability of the stated event. Exactly 6 correct answers
For the experiment of drawing a single card from a standard 52 card deck find (a) the probability and (b) the odds are in favor that they do not drive six
View More
14.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