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.THINK: WHAT NEW LIT THEORY LENS DO YOU THINK SHOULD EXIST?
When preparing for this assignment, ask yourself the following
...
yourself the following to start planning your new theory:
Is there a theory we studied that you disagree with? What about it do you dislike or wish to change? Why?
Which theory would you want to expand further or alter to make it more inclusive of a certain group/culture/trend etc.?
What topics in the media angers/upsets/excites/confuses you the most?
While reading The Immortal Life of Henrietta Lacks and/or an essay from The Anthropocene Reviewed, were you particularly drawn to certain events/characters/settings/symbols etc.?
What is your favourite genre of media? (i.e. novels, films, short stories/films, articles, TV shows, poetry, advertising, social media etc.)
CREATE: Now use your brainstorming and knowledge of literary theories to create a new school of literary criticism and apply it to either Henrietta Lacks OR The Anthropocene Reviewed, and one other text of your choice.
PRESENT: Design and create a multimedia presentation that incorporates words and images/graphics presenting your new theory.
What kind of multimedia presentation should I create? E.g. a slideshow of 10-15 slides, a video no longer than 2 minutes, an infographic, an annotated painting/graphic design, magazine article/issue
Your multimedia presentation must include the following:
a unique name for your new theory
a brief definition for your theory - types of questions to ask yourself when using your lens
a brief rationale statement for your theory (rationale is basically why you believe this theory needs to exist and how it was inspired)
an application of your theory to any piece of literature (novel, play, short story, fairy tale) or alternate media text (TV show, comic, advertisement, painting, film clip) **Note: You will have to summarize/introduce your choice of text (e.g. film clip, fairy tale, comic, painting etc.) before you apply your theory
an application of your theory to one passage approx. 250 words long from The Great Gatsby. (not the passage you chose from Lit Theory Assignment #1)
Complete the “Student Comments” part of the rubric (see below) evaluating your final piece
Check out some Level 4 examples to get an idea of what a new theory and its application could look like for student selected texts.
You will upload your final presentation to GC on the due date as shown on the class calendar. You will NOT have to present your final product to the class.
View More
3.ssay 1: Person I Admire
Purpose
This essay assignment is the culmination of all your previous work in this module. You have
...
in this module. You have already engaged in the beginnings of the writing process of this essay. You have:
Brainstormed ideas (see Chapter 11 in SMG) about the essay in the Discussion Board.
Condensed your ideas down into manageable points around a working thesis.
Displayed knowledge of Description essays from Learning Activities
Drafted a Writing Activity (WA2) about this Description essay.
Consulted with a writing tutor to find areas of strength and areas of improvement.
Finally, you will now compose the final draft of a description essay that:
contains a clear thesis
identifies clear points to support your thesis
engages in critical thought about the subject chosen
uses 2-4 main ideas (points) that support your overall essay thesis
allows you to expand on your chosen topic
This essay assignment represents the first steps in writing any written essay for any academic course. The idea of thesis and support are the cornerstones of all essays. They represent the last part of the writing process. However, you may still revise your essay before final submission. This form of essay writing is the basis for all other academic writing pursuits. This skill translates to almost all careers that require critical thinking, critical reading, and responding in writing. Practicing "how to" write an essay carries over into any field's task of "what" you need to write. This skill will help with all formal writing.
Task
Write a 900-word essay, in MLA format, about a person or fictional character in whom you have an interest.
Select a subject (person or fictional character you admire)
Look to your Discussion (D1) and Writing Activity 2 (WA2) for your subject
The person may be current or historical
Some fictional characters have positive traits that can be identified.
Select several (2-4) traits about the person or character that you admire and write about these. These will be the essay's main ideas.
Biographical information should be used only to support claims.
Your essay should focus on the traits you admire. Do not write a biography or tell a story.
Example of what not to do: This person was born in 1979. They were born in middle Tennessee. They went to elementary school is 1985. They graduated in 1998.
Instead, follow this example: This person was born in middle Tennessee. Entering elementary in school in 1985 was hard for them. They never felt that they belonged in kindergarten. However, they persevered, learning that school was a place for them to grow and be themselves.
Focus on the "why" you admire them instead of a list of traits. In the above example, perseverance and learning to be themselves are the traits the writer of the essay admires.
Organize your main ideas to establish the essay's pattern of organization.
Your main ideas (traits you have chosen) need to be clearly organized.
Decide in what order you wish to discuss these main ideas (traits)
This organization needs to be presented in your introduction, preferably as the last sentence of your introduction in the thesis statement.
Note: your thesis is generally the last sentence in your introduction, but it not a requirement.
Follow this structure throughout the rest of the essay.
Always check to see if your main ideas/topic sentences, in each paragraph, relate back to your thesis statement.
Compose 5 well-developed paragraphs that support a clear thesis statement that is arguable.
5 paragraph minimum
introduction paragraph
introduces your essay and presents your thesis
three body paragraphs
Each paragraph contains one of your chosen admirable traits about your subject
expressed in a topic sentence in your paragraph
Each trait needs to transition to the next one in the next paragraph
look to your chosen pattern of development
conclusion paragraph
rephrases your traits into one last paragraph
reflects the earlier thesis, but with the knowledge of your traits expressed throughout the essay
This essay is a basic form of an argument essay. The essay should make an argument such as that the person or character selected is worthy of admiration because of the traits selected.
Criteria for Success
A successful essay:
Meets basic requirements of the assignment
Has been written by the student submitting the essay, for this class, and for this semester,
Does not contain plagiarism of any kind
Academic dishonesty is an offense of the NSCC Student Code of Conduct, punishable by a failing grade or zero
Has a clear thesis, main ideas, and pattern of organization
Has been carefully edited and proofread to minimize grammatical and other editing errors
These can be remedied by editing and with Writing Tutor visits and peer reviewing
Follows MLA style and guidelines (spacing, indent, margins, etc. )
The essay will be graded with the Grading Rubric for Essays. Please familiarize yourself with this rubric before you submit your essay. Here is the condensed version of the rubric:
View More