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.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
3.Macroeconomic powerpoint presentation on Inflation vs deflation. Below is the Assignment description: This course has a Final Project which is
...
: This course has a Final Project which is in the form of a PowerPoint presentation (you may also use Google Slides). You can choose a topic from this semester or something you come up with yourself, but your presentation must be about economics and be original (i.e. not just material verbatim that you have pulled from your text/readings or off the internet). Of course, you can still insert charts, graphs, videos, graphics and excerpts from outside sources (as long as you cite those sources!) I want to see your commentary and analysis, in your own words. IMPORTANT: Copying the work of others and representing it as your own (ex. copy and paste off of the internet or your text, OR using someone else's work and just changing a few words) is Plagiarism, a serious academic offense. I have enabled the Turnitin plagiarism checker for this assignment, to help you identify potential areas of plagiarism. Papers that are substantially plagiarized will NOT be accepted for grading. Although the format is a Power Point, I want to emphasize that this is NOT like your typical Power Point, which is basically an outline for a live presentation. Your project must be substantially loaded with content. The first slide should be your Introduction slide, the next 10-15 slides should be informational slides, the second to last slide should be your conclusion (which summarizes your presentation) and the last slide should be the reference slide. Make sure you review the rubric below BEFORE you start your project, so that you are clear on how your project will be graded. NOTE: The due date is Wednesday, 12/16. A 20% late penalty will be assessed every day for assignments submitted past this date. PLEASE contact me if you have any questions about the requirements of this project, plagiarism, citations...or any other concerns! Rubric: Final Project Presentation Criteria Ratings Pts Introduction 5.0 pts Excellent/Good 3.0 pts Satisfactory/Needs Improvement 1.0 pts Unsatisfactory 5.0 Content 35.0 pts Excellent/Good 25.0 pts Satisfactory/Needs Improvement 15.0 pts Unsatisfactory 35.0 Conclusion 5.0 pts Excellent/Good 3.0 pts Satisfactory/Needs Improvement 1.0 pts Unsatisfactory 5.0 Organization 15.0 pts Excellent/Good 10.0 pts Satisfactory/Needs Improvement 4.0 pts Unsatisfactory 15.0 References and Citations 10.0 pts Excellent/Good 7.0 pts Satisfactory/Needs Improvement 3.0 pts Unsatisfactory 10.0 Total points: 70.0
View More
4.ou are a consultant who works for the Diligent Consulting Group. In this Case, you are engaged on a consulting
...
consulting basis by Loving Organic Foods. In order to get a better idea of what might have motivated customers’ buying habits you are asked to analyze the ages of the customers who have purchased organic foods over the past 3 months. Past research done by the Diligent Consulting Group has shown that different age groups buy certain products for different reasons. Loving Organic Foods has sent a survey to 200 customers who have previously purchased organic foods, and 124 customers have responded. The survey includes age data of past customers who purchased organic foods in the previous quarter.
Case Assignment
Using Excel, create a frequency distribution (histogram) of the age data that was captured from the survey. You should consider the width of the age categories (e.g., 5 years, 10 years, or other). That is, which age category grouping provides the most useful information? Once you have created this histogram, determine the mean, median, and mode.
After you have reviewed the data, write a report to your boss that briefly describes the results that you obtained. Make a recommendation on how this data might be used for marketing purposes. Be sure to conduct adequate research on organic foods industry, organic market analysis, and healthy food industry using IBISWorld database or other databases such as Business Source Complete (EBSCO) and Business Source Complete - Business Searching Interface in our online library. Provide a brief description on the industry background and the consumer changing attitudes and behavior toward healthy lifestyles. Also identify the customer demographics of organic food industry and explain how the customers of Loving Organic Foods are different from this target market.
Data: Download the Excel-based data file with the age data of the 124 customers: Data chart for BUS520 Module 1 Case. Use these data in Excel to create your histogram.
Assignment Expectations
Excel Analysis
Complete analysis in Excel using the Histogram function. Please watch the following video which covers how to create a histogram in Excel: https://www.youtube.com/watch?v=GL91GrVf3EY
If you are not so familiar with Excel, refer to the following link on Excel training videos: https://support.office.com/en-us/article/Excel-training-9bc05390-e94c-46af-a5b3-d7c22f6990bb?ui=en-US&rs=en-US&ad=US
Check the professional market research reports from the IBISWorld database to conduct the industry analysis. IBISWorld can be accessed in the Trident Online Library.
IBISWorld Overview (n.d.). IBISWorld, Inc., New York, NY.
IBISWorld Forecast (n.d.). IBISWorld, Inc., New York, NY.
IBISWorld Data and Sources (n.d.). IBISWorld, Inc., New York, NY.
IBISWorld Navigation Tips (n.d.). IBISWorld, Inc., New York, NY.
Written Report
Length requirements: 4–5 pages minimum (not including Cover and Reference pages). NOTE: You must submit 4–5 pages of written discussion and analysis. This means that you should avoid use of tables and charts as “space fillers.”
Provide a brief introduction to/background of the problem.
Provide a brief description of organic food industry and target market characteristics such as their demographics, lifestyles and shopping behaviors.
Provide a written analysis that supports your Histogram age groups (bins).
Based on your analysis of the histogram data, provide complete and meaningful recommendations as the data relates to Loving Organic Foods’s marketing strategy.
Write clearly, simply, and logically. Use double-spaced, black Verdana or Times Roman font in 12 pt. type size.
Have an introduction at the beginning to introduce the topics and use keywords as headings to organize the report.
Avoid redundancy and general statements such as "All organizations exist to make a profit." Make every sentence count.
Paraphrase the facts using your own words and ideas, employing quotes sparingly. Quotes, if absolutely necessary, should rarely exceed five words.
Upload both your written report and Excel file to the case 1 Dropbox.
View More
5.Writing prompt can someone please help me out ASAP??
After reading the excerpts from Beowulf in Unit 1 and the
...
Unit 1 and the attached article, "Are you monomythic? Joseph Campbell and the hero's journey," argue whether or not Beowulf fits the characteristics of Joseph Campbell's monomyth and hero's journey. After reading and annotating both texts, complete a prewriting, argumentative graphic organizer for the prompt above. Then, in a multi-paragraph response, create a fully developed, organized argument based on the prompt. Include the following in your response: 1. Your claim-Thesis Statement 2. A counterclaim 3. Evidence from the texts supporting your claim 4. Formal language and appropriate style for the audience 5. Proper use of conventions (spelling, punctuation, and grammar)
View More
6.Problem 4 (20 points). Consider the Newmarket 5K dataset. A dataset with certain rows deleted (where there was no Age
...
there was no Age and/or Sex entered) has been created. It is called Newmarket_Cleaned.csv.
Data file: Newmarket_Cleaned.csv
(Links to an external site.)
. Direct HTTP link: https://unh.box.com/shared/static/p8x4xlbean3rlslmfskfu74fe89yjui8.csv
Please use it for this problem. Consider the “Model 4” developed in class, which contained Age, Age^2, and Sex as independent variables. First re-create this model with the cleaned dataset (you will need to create the Age^2 column; you can verify your model summary against the one from class), and then proceed with this problem.
Make the necessary changes to the model to incorporate Year as a categorical explanatory variable (you may need to change how R interprets the variable, before running this model). Does the year of the race seem to be related to mean finishing time, after taking into account the other variables in Model 4? Use the 0.05 significance level. Explain your work/logic, and key output to support your answer.
Using the updated model, after accounting for age and sex, what is the expected difference in finishing times for runners from 2008 versus runners from 2004?
Using the updated model, after accounting for age and sex, what is the expected difference in finishing times for runners from 2014 versus 2011?
In the above, the directions are to treat Year as a categorical variable. Explain how the regression model would be different if it instead were treated as a numeric variable. What are the assumptions being made about the effect of Year in the two different approaches?
View More
7.A student wants to enroll in a seminar so he/she submits her name and student number to the registrar; therefore
...
r; therefore she may be validated to become an eligible student at the university. Once the registrar verifies the student, the student indicates the seminar she wants to enroll in from the list of those available. The registrar validates the student is eligible to enroll in the seminar and that the seminar fits the student’s schedule. The registrar calculates the fees for the seminar– based on the fee published in the course catalog, applicable student fees and taxes, and informs the student. The registrar verifies with the student that she still wants to enroll in the seminar, and then enrolls the student. The registrar adds the appropriate fees to the student’s bill and provides the student with a confirmation that she is enrolled.
Instructions:
Using a UML tool of your choice, create a Use Case model for Enroll in a seminar. Your model should include one or more opportunities for reuse.
Based on the model you developed, create a UI flow diagram that extends your Use Case model showing the UIs (screens and/or reports) used to enroll in a seminar. An UML Activity diagram can be used for the UI flow diagram. Also, please fill in the provided UI flow chart to describe the UIs in your flow diagram.
View More
8.In this assignment, you will analyze a problematic relationship you have had or one you have observed. (If you don't
...
d. (If you don't wish to share a real relationship, you may use one from a book, movie, or television program.) Try to create a pragmatic description of the communication interaction that took place. That is, describe it as if it were a game; perhaps a game that only one of you seems to know the rules.
Please specifically include the following:
1. Name the game
2. Provide a brief description of the problematic relationship.
3. List the ground rules for the game.
4. Identify the "plays" in the game - that is the repeated patterns of "moves" that the individuals act out.
5. Respond to two reflection questions: What insights does seeing this as a game give you? Now that you have identified the game, what suggestions can you make for improving the relationship?
View More