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
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
4.Describe the parallels between cell differentiation, nutrient supply, and final cellular state for the majority of cells involved in the
...
he majority of cells involved in the epidermis, hair follicles/hair growth, and nail synthesis/nail growth.
How does the structure of spongy bone support the function of the red bone marrow contained within said bone?
How do bones, synovial fluid, tendons, ligaments, and articular cartilage work together to allow synovial joint movement? Please explicitly include the bone feature that allows for tendon/ligament attachment.
What is the difference in function between the vertebrae and the intervertebral disks in the vertebral column? Please discuss both the connective tissue subtype for each of these features and how the composition of their extracellular matrix contributes to function
Describe the extracellular matrix of bone to someone who isn't familiar with anatomy (this should be a general description of appearance/tactile nature, no specific mention of cells or function is needed)
How does hair contribute to the sensory role of the integumentary system? (A short explanation is all that is needed, no in-depth description of associated structures is required for full credit)
Back when he was 16, Jordan left eye orbit floor was fractured in a bizarre fencing accident, leaving a few fragments behind inside his skull. Assuming the floor was punctured from above in the maxillary bone and no additional bones were broken, where did the bone fragments end up in his skull? (This should be a particular space in the skull, not a separate bone where the fragments are embedded
The skeletal and integumentary systems rely heavily on collagen for function - describe one or more features other than ligaments that involve collagen, and how you would expect function to change in someone with EDS that affected the relevant subtype of collagen
View More
6.5 students participated in a Exam. There were 3 subjects. All numbers were stored in a two - dimensional array.
Marks
...
onal array.
Marks of each students :
CSE115 CSE 173 CSE215
Jamal 80 70 60
Mamunul 57 76 74
Saad 67 98 87
Rana 98 87 90
Mabubur 45 97 34
1. How to create function named myTotalMark which calculate Total Obtained marks of each students, Print Total marks of each students with their name. Note: Create 2D array using marks in this function and pass same array to next function(specificStudent and specificMarks) as a parameter.So you have to call those function from myTotalMark.
2. Now create another function named specificMarks which calculate Total average marks of Three specific subjects according to teachers input(1 to 5).If teacher Enter 1 it will calculate average marks of CSE115 course.Store marks in a Array and print average marks with subject name. void specificMarks(int subject[5][3])
3. Create another function named specificStudent which calculate Three Specific students marks according to teachers input(1 to 10).If teacher Enter 1 it will calculate the total marks of Jamal.Store marks in a Array and print three students mark with their name.Pass this array to Grade function as a parameter. void specificStudent (int student[5][3])
4. Create another funciton named grade which Calculate grade of Three students which were obtained in specificStudent Function.Using this range: void grade(int number[ ] )
100-200 B+
201-300 A-
301-500 A
5. Now create main function and call only myTotalMark function to display output.
please do it in #c program
View More
7.Please spend 20 minutes each day (Mon-Fri) that we are not in school this week applying what you have learned
...
e learned from your articles to the Socratic Seminar Questions below.
Each response should be 1-3 Paragraphs long.
For each question remember to cite information from the articles you read and analyzed.
To What Extent Are We Our DNA?
-In other words, how much of who we are does our DNA control?
How do you take DNA from two people (parents) and combine it to make one person (child)?
How can a child display a trait that neither of their parents themselves have?
Do all populations have the same genetic variation?
-How can we explain the pattern and trends we see in populations?
To What Extent Are Genetic Variations a Life or Death Situation?
-In other words, how do variations in a species’ DNA promise them Life or Death?
What are the possible causes of genetic variation in a population?
To what extent does genetic variation depend on mutations?
How Has Our Increased Understanding of Genetics Affected Society?
How has our increased understanding of genetics affected the world?
How has our increased understanding of genetics affected the United States?
How has our increased understanding of genetics affected your community?
View More
8.Hello
I am a father of two children, one in the IB DP now, and the other is in 9th grade.
...
oking for an online math and SAT/ACT tutor, possibly an IB Math tutor as well.
My children are native English speakers, but go to an international school. They are looking to attend an English speaking school for the university.
Can you please let me know the price range I am expected to pay per hour? Also, I haven’t had some of the best experiences in the past with someone claiming that they could help with SAT only to find out that they weren’t qualified. At this point, I will need a way to demonstrate your expertise as an SAT or ACT tutor. Also, for IB Math, if you are able to do both.
I look forward to hearing from you. Just to let you know, I have other friends looking for a similar tutor. Please make sure to send your CV, and a personal statement if you have one, so I can better understand your teaching/tutoring philosophy better.
Oh yes, where are you located for time zone differences?
Best,
Edward Rochman
View More
13.Must know how to use TI 84 Plus CE calculator and be able to teach that skill without wasting time,
...
or give some complimentary/bonus time while you figure it out, or figure out how to do particular things between sessions instead of during the session
Current topics: understand slope and y-intercept and be able to apply it to equations written using different letters instead of m and b or instead of y and x; parallel, perpendicular line equations; calculate slope/gradient of graphs/sides of shapes/equations; calculate midpoint; calculate distance between two points on a graph; find the equation of a line given a graph or given 2 points; learn the meanings of symbols such as R for real numbers, Z for integers' calculate area of a triangle on a graph
The student is in Kazakhstan and speaks Russian and Kazakh fluently, but is intermediate in English. Please speak with her in English as much as possible, but knowing Russian or Kazakh would be a good bonus that would make you preferable to other tutors all else being about the same, though familiarity with TI calculators or the ability to figure them out is also very important.
View More
14.I have to interview an Engineer (Civil, Industrial, or Electrical would be best but any would do.) I need help
...
need help and I would really appreciate this, Thank you and here are the questions. Interviewee name
Interviewee’s specific degree
Interviewee’s place of employment
Interviewee’s email address
Please describe your engineering field.
What is your current job title?
Please describe your particular job and duties.
What is your average work schedule?
Starting with high school, please describe your educational background chronologically.
If you had it to do over, related to your career or education, would you do anything differently?
What advice would you give to me as someone interested in pursuing a career path similar to yours?
View More
15.I have a few questions I need answered by an Electrical, Civil, or Industrial Engineer (Any Engineer would work as
...
would work as well). This is just a small interview I need help with. I would really appreciate it if someone could help me. Here are the Questions
Interviewee name
Interviewee’s specific degree
Interviewee’s place of employment
Interviewee’s email address and/or phone
Please describe your engineering field.
What is your current job title?
Please describe your particular job and duties.
What is your average work schedule?
Starting with high school, please describe your educational background chronologically.
If you had it to do over, related to your career or education, would you do anything differently?
What advice would you give to me as someone interested in pursuing a career path similar to yours?
View More
16.: There are four things that you need to do in order to successfully complete this module's discussion questions assignment.
...
on questions assignment. First, if you have not already done so, read pages 381-382 in the textbook. Second, complete the discussion questions that appear below. Please copy and paste the questions onto a Word document; then, type your responses after each question. To view the questions, please scroll down.
Third, in the textbook, read “A Modest Proposal” by Jonathan Swift (pages 214-222) and “How to Raise a Pimp” by Darryl L. Fortson, M.D. (pages 231-233). Fourth, complete the discussion questions regarding “A Modest Proposal” and “How to Raise a Pimp.” Again, please copy and paste the questions onto a Word document; then, type your responses after each question. To view the questions, please scroll down.
Due Date: Please see the Canvas announcement regarding this assignment.
Final Thoughts: Good luck with this assignment. You do not need to write an essay response to each question, so please do not do so. In fact, you should be able to successfully respond to each question in several sentences or a paragraph at most. If you have any questions or concerns, please feel free to e-mail or call me.
Discussion Questions
Pages 381-382
1. On pages 381-382, there is paragraph about tropical fish. Please quote the author’s stated claim exactly as it appears in the paragraph. (Hint: the stated claim is one sentence long.)
2. On pages 381-382, there is paragraph about tropical fish. Since this paragraph is a satire, you know that the stated claim is not what the author truly believes, so please paraphrase the author’s implied claim. (Hint: the implied claim should be one sentence in length.)
3. On page 382, there is paragraph about circuses. Please quote the author’s stated claim exactly as it appears in the paragraph. (Hint: the stated claim is one sentence long.)
4. On pages 381-382, there is paragraph about circuses. Since this paragraph is a satire, you know that the stated claim is not what the author truly believes, so please paraphrase the author’s implied claim. (Hint: the implied claim should be one sentence in length.)
Discussion Questions
“A Modest Proposal” by Jonathan Swift
1. The author of the work is not the same individual who is making the claim. In fact, Swift assumes a persona, the persona of someone he, hopefully, is not. List some of the characteristics of his alter-ego.
2. What is the proposer’s (we will use the word proposer to identify the individual making the claims) attitude toward the beggars he describes in the opening paragraphs?
3. In one sentence, paraphrase the proposer’s stated claim.
4. In one sentence, paraphrase the proposer’s implied claim.
5. According to the proposer, what are some of the issues that need correcting?
6. How does the use of facts and statistics help to bolster the proposer’s credibility?
7. Who will be the beneficiaries of this modest proposal?
8. Identify at least four good things that will come from this modest proposal.
9. Does the proposer address any arguments that might be raised against his modest proposal? If so, how does he address them?
10. Looking at the final paragraph, why does the proposer end his modest proposal in this manner?
11. Who is the intended audience of this satire?
12. Did you enjoy this satire? Why?
13. Does this satire have any relevance for us reading it today? If so, what is it?
Discussion Questions
“How to Raise a Pimp” by Darryl L. Fortson, M.D.
1. In one sentence, paraphrase the author’s stated claim.
2. In one sentence, paraphrase the author’s implied claim.
3. According to the author, what are the four things that one must do in order to raise a pimp?
4. Who is the intended audience of this satire?
5. What is the author trying to accomplish with his satire?
6. Did you enjoy this satire? Why?
7. Do you think this satire is effective? Why?
View More
18.To gain experience with the operations involving binary search trees. This data structure as linked list uses dynamic memory allocation
...
list uses dynamic memory allocation to grow as the size of the data set grows. Unlike linked lists, a binary search tree is very fast to insert, delete and search.
Project Description
When an author produce an index for his or her book, the first step in this process is to decide which words should go into the index; the second is to produce a list of the pages where each word occurs. Instead of trying to choose words out of our heads, we decided to let the computer produce a list of all the unique words used in the manuscript and their frequency of occurrence. We could then go over the list and choose which words to put into the index.
The main object in this problem is a "word" with associated frequency. The tentative definition of "word" here is a string of alphanumeric characters between markers where markers are white space and all punctuation marks; anything non-alphanumeric stops the reading. If we skip all un-allowed characters before getting the string, we should have exactly what we want. Ignoring words of fewer than three letters will remove from consideration such as "a", "is", "to", "do", and "by" that do not belong in an index.
In this project, you are asked to write a program to read any text file and then list all the "words" in alphabetic order with their frequency together appeared in the article. The "word" is defined above and has at least three letters.
Note:
Your result should be printed to an output file named YourUserID.txt.
You need to create a Binary Search Tree (BST) to store all the word object by writing an insertion or increment function. Finally, a proper traversal print function of the BST should be able to output the required results.
The BST class in the text can not be used directly to solve this problem. It is also NOT a good idea to modify the BST class to solve this problem. Instead, the following codes are recommended to start your program.
//Data stored in the node type
struct WordCount
{
string word;
int count;
};
//Node type:
struct TreeNode
{
WordCount info;
TreeNode * left;
TreeNode * right;
};
// Two function's prototype
// Increments the frequency count if the string is in the tree
// or inserts the string if it is not there.
void Insert(TreeNode*&, string);
// Prints the words in the tree and their frequency counts.
void PrintTree(TreeNode* , ofstream&);
//Start your main function and the definitions of above two functions.
Sample Run
Please type the text file name: Lincoln.txt
Please give the output text file name: mus11.txt
You are done! You can open the file "mus11.txt" to check.
Press any key to continue
------------------------------------------------------------------------------------------------------------------------------------------------
lincoln.txt---
The Gettysburg Address
Gettysburg, Pennsylvania
November 19, 1863
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in
Liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and
so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate
a portion of that field, as a final resting place for those who here gave their lives that that nation
might live. It is altogether fitting and proper that we should do this.
But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground.
The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add
or detract. The world will little note, nor long remember what we say here, but it can never forget what
they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they
who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great
task remaining before us -- that from these honored dead we take increased devotion to that cause for
which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not
have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government
of the people, by the people, for the people, shall not perish from the earth.
------------------------------------------------------------------------------------------------------------------------------------------------
mus11.txt
1863 1
Address 1
But 1
Four 1
Gettysburg 2
God 1
Liberty 1
November 1
Now 1
Pennsylvania 1
The 3
above 1
add 1
advanced 1
ago 1
all 1
altogether 1
and 6
any 1
are 3
battle-field 1
before 1
birth 1
brave 1
brought 1
but 1
can 5
cause 1
civil 1
come 1
conceived 2
consecrate 1
consecrated 1
continent 1
created 1
dead 3
dedicate 2
dedicated 4
detract 1
devotion 2
did 1
died 1
earth 1
endure 1
engaged 1
equal 1
far 2
fathers 1
field 1
final 1
fitting 1
for 5
forget 1
forth 1
fought 1
freedom 1
from 2
full 1
gave 2
government 1
great 3
ground 1
hallow 1
have 5
here 8
highly 1
honored 1
increased 1
larger 1
last 1
little 1
live 1
lives 1
living 2
long 2
measure 1
men 2
met 1
might 1
nation 5
never 1
new 2
nobly 1
nor 1
not 5
note 1
our 2
people 3
perish 1
place 1
poor 1
portion 1
power 1
proper 1
proposition 1
rather 2
remaining 1
remember 1
resolve 1
resting 1
say 1
score 1
sense 1
seven 1
shall 3
should 1
struggled 1
take 1
task 1
testing 1
that 13
the 9
their 1
these 2
they 3
this 4
those 1
thus 1
under 1
unfinished 1
vain 1
war 2
what 2
whether 1
which 2
who 3
will 1
work 1
world 1
years 1
View More