Search write-a-program-to-allow-a-user-to-enter-numbers-display-how-many-numbers-are-more-than-or-equal

Write a program to allow a user to enter numbers display how many numbers are more than or equal

 
 

Top Questions

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.In this problem and the next one, we’re going to make a very simple spam checker program by just looking ...

ooking at how likely a given email is to be spam based on the words it contains. In particular, in this problem we’re going to count how often words are present in spam emails within some set of training data (which here means a set of emails that have already been marked as spam or not spam manually). We have already started to write a function spam_score(spam_file, not_file, word), which takes in two filenames, along with a target word (a lowercase string). Both filenames refer to text files which must be in the same directory as hw07.py (we’ve provided several such files in hw07files.zip). The text files contain one email per line (really just the subject line to keep things simple) - you can assume that these emails will be a series of words separated by spaces with no punctuation. The first file contains emails that have been identified as spam, the second contains emails that have been identified as not spam. Since you haven’t learned File I/O yet, we’ve provided code that opens the two files and puts the data into two lists of strings (where each element is one line - that is, one email). You then must complete the function, so that it returns the spam score for the target word. The spam score is an integer representing the total number of times the target word occurs across all the spam emails, minus the total number of times the word occurs in not-spam emails. Convert all words to lowercase before counting, to ensure capitalization does not throw off the count.
View More

4.1. Complete an algorithm, code and compile the following program. Save the program as finalgrade.py. Final Grade Calculator Write a program that ...

Final Grade Calculator Write a program that allows an instructor to calculate the final grade for the students in a class. Use the following menu to drive the program: 1. Enter new student information 2. Exit When the user chooses (1) they will be prompted for the following information: Number of Exams and the grade for each Number of Quizzes and the grade for each Number of Homework assignments and the grade for each Input validation: All grades entered must be between 0 and 100. The final grade is then calculated as follows: Exams: 40% of final grade Quizzes: 40% Homework: 20% Display the final grade for each student. The user may enter as many students as possible until they choose to quit. Please see attached output example. 2. Upload both your algorithm and your source code. Grading Rubric: (20 points) Include the following in your algorithm: Algorithm (3 points) If statements/Loops (8 points total) Main menu loop and if statements (4) Input validation loop for exam, quizzes, homework grade (2) Input validation for main menu (2) Calculations (9 points total) Average exams (2) Average quizzes (2) Average homework (2) Final Grade (3)
View More

6.I need help getting started with my C++ assignment. This is the prompt of the assignment and guidelines must follow. ...

delines must follow. The purpose of this assignment is to give you practice using structs, using strings, writing functions and sorting. You will read a student file into an array of structs, determine grades, sort the array and print it out. Program Steps and Requirements Use the Student struct shown below. Read the input file (partially shown below) and store the data in an array of structs. The input file contains 55 student records and one heading line. Write code to determine the grade for each student. The grade determination is exactly as specified for this class in the syllabus. Remember to discard the lowest assignment grade. Sort the array of student students in descending order by the total points. Write the output file using the exact format shown below and include the two lines of headings in the output. Required Student struct and named constants const unsigned NumberOfStudents = 55; const unsigned PointsPossible = 400; const unsigned NumberOfAssignments = 10; const unsigned NumberOfExercises = 10; struct Student { int id; string name; int exercise[NumberOfExercises]; int assignment[NumberOfAssignments]; int midterm; int final; int codelab; int exerciseTotal; int assignmentTotal; int totalPoints; int percent; string grade; }; Input file -StudId- -------Name-------- -----Exercises----- ---------Assignments--------- Mi Fin CL 12345678 Smartiepants, Sam 5 4 5 4 5 5 5 5 5 5 20 19 20 20 20 20 19 20 20 19 65 98 9 18519268 Mendoza, Victor 4 2 5 4 1 4 5 5 5 4 17 12 17 18 14 17 19 18 14 18 59 49 6 23276929 Chien, Shengfeng 2 3 0 4 4 5 2 5 5 2 9 18 15 8 19 18 18 16 19 13 64 89 8 18242679 Dhaliwal, Shawn 5 5 3 4 5 4 2 4 4 5 9 18 17 15 18 19 12 15 18 14 45 92 9 09869966 Miraftab, Mina 5 3 5 5 3 5 4 0 4 3 17 4 3 18 12 16 14 17 17 12 52 68 7 10930997 Dimas, Abraham 5 3 4 5 4 3 4 3 3 3 12 18 20 11 14 7 15 10 18 15 64 89 6 11545560 Masongsong, Mikhael 1 3 5 4 3 4 5 3 5 5 19 19 9 13 17 20 20 14 14 19 64 96 8 10626377 Zigler, Joshua 4 3 4 3 2 5 4 4 4 5 17 14 18 20 17 18 12 19 14 14 51 90 5 ... Output report file Stud Id Name Ex Ass Mi Fin CL Tot Pct Gr -------- ------------------- -- --- -- --- -- --- --- -- 12345678 Smartiepants, Sam 48 178 65 98 9 398 100 A+ 11545560 Masongsong, Mikhael 38 155 64 96 8 361 90 A- 20767544 Martins, Gustavo 40 144 67 97 10 358 90 A- 23305464 Zumwalt, Jacob 37 160 62 90 8 357 89 B+ 23579439 Feirstein, Berent 42 159 55 91 9 356 89 B+ 14965959 Ho, Brandon 40 157 66 84 8 355 89 B+ 19988142 Wang, Lu 31 157 58 98 9 353 88 B+ 09559062 Mora, Gabriel 36 137 67 100 7 347 87 B 19108176 Bailey, Tanequa 44 152 56 85 8 345 86 B Suggested main function int main() { Student students[NumberOfStudents]; getStudentDataFromFile(students, InputFilename); determineGrades(students); sort(students); printStudentDataToFile(students,OutputFilename); }
View More

7.Write program that draws out a path based on the user input. The starting coordinates for the path is the middle ...

is the middle of the DrawingPanel. Ask the user to enter an x and a y coordinate for a DrawingPanel. Your program will draw a line from the last coordinates to the current coordinates the user enters. If the user enters an x value or y value out of bounds of the DrawingPanel, then end the program.
View More

8.Learning Objectives Design and write pseudocode using a repetition structure Design and write Java for a class, including attributes, accessors, mutators, and ...

va for a class, including attributes, accessors, mutators, and constructors. Design and write Java for an application program that instantiates and uses objects of a user-defined class. Use the repetition structure in class methods and application program modules. Perform error checking. Use a graphical drawing program (ArgoUML) to create class diagrams. Directions for completing and submitting the homework: You will be submitting the following files: Task #1: Pseudocode written with Word, Notepad++, or similar application Task #2: Pennies.java Task #3 Inventory.java The application class created in 3b below The UML class diagram created in ArgoUML, Raptor, or similar application Homework Assignment: Write the pseudocode needed to complete Chapter 5, number 9 – Pennies for Pay. Implement Pennies for Pay in Java. The Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. Design a class diagram showing the class, the application program, the relationship between the two, and multiplicity. Then write the Java code as described below. Be sure to follow the CSI 117 Style Criteria (Links to an external site.) for naming conventions, class diagrams, pseudocode, keywords, and operators. An Inventory class that contains: an item number and the original price of the item. Include the following: A default constructor that initializes each attribute to some reasonable default value for a non-existent inventory item. Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated. Be sure to incorporate adequate error checking for all numeric attributes. Accessor and mutator methods for each attribute. Be sure to incorporate adequate error checking for all numeric attributes. Extra credit for including Javadoc comments. An application program that contains two methods: the main() module and the printSaleData()module. The main()module must do the following: create an Inventory object using the default constructor use a loop to get inventory items from the user. The user should enter the item number and the original price of the item. This loop should continue until the user indicates that they have no more items to enter. For each item entered by the user, the code inside the loop should do the following 2 items: set the attributes of the Inventory object by calling the appropriate method in the Inventory class for each item entered by the user send the Inventory items, one at a time, to the printSaleData() module for processing Extra credit for including Javadoc comments. The printSaleData()module must accept an Inventory object and produce a report that shows the item number and the price of an inventory item on each day of the sale, one through seven, using a loop. For example, an item with an original price of $10.00 costs 10 percent less, or $9.00, on the first day of the sale. On the second day of the sale, the same item is 10 percent less than $9.00, or $8.10.
View More

1.AU MAT 120 Systems of Linear Equations and Inequalities Discussion

mathematicsalgebra Physics