Concept explainers
Modify
Trending nowThis is a popular solution!
Chapter 4 Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Additional Engineering Textbook Solutions
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out with Python (4th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
- Write a program that computers and assess the tuition fee of the students in one trimester, based on the given mode of payment below:Plan(key) Discount/interestCash(1) 10% discountTwo-Installment 5%interestThree-Installment 10% interestSample input/output dialogue:Enter Tuition Fee: 20000Enter Mode of Payment: 2Your total tuition fee is : 21000arrow_forwardIn Python, Write a program that continuously asks for a non-negative score until the user enters -1. IF the user enters a valid score ask for the possible score for that assignment, we will not assume all scores will have the same maximum value. We will assume that no one will receive a score of 0 on any assignment IF anything it is actually turned in, meaning a score of 0 indicates that the score was not turned it. It’s still the score for the assignment, but this fact will be used later in the assignment. Once all of the scores have been entered display the following information: • Total number of scores entered. • Total points for the student. • Total number of possible points • Class percentage, with 2 decimal place. • Letter grade using the 90, 80, 70, 60 grading scale. • If we believe the student has dropped. We will assume this is true if ALL of the entered scores are 0 (indicating that nothing was turned it). • If all of the scores were turned in or if the student is missing at…arrow_forwardCreate a program that outputs a result for a student based upon the mean grade of eight module grades and a project mark. The rules for the marks are the same as for the above exercises. The pass mark is 40 and a valid grade is in the range [0,100]. These rules apply to individual module grades and to the project. The result is computed as follows: If any individual module grade or the project grade is not valid then the result is “ERROR”. If any single grade (for a module or the project) is less than 40, the result is “FAIL”. If the mean mark for the modules is less than 40, the result is “FAIL”. If the criteria for “ERROR” and “FAIL” do not apply, and either the mean grade or the project grade is less than 50, the result is “PASS”. If the criteria for “ERROR”, “FAIL” and “PASS” do not apply, and either the mean grade or the project grade is less than 70, the result is “MERIT”. If the mean module grade and the project grade are greater than or equal to 70, the result is “DISTINCTION”.…arrow_forward
- Write a program that computes the earnings per shift for a babysitter. A babysitter charges $10 per hour before noon and $15 after noon. The program reads the starting time in hours and minutes and the ending time in hours and minutes. All times are between 8:00 am, and 7:59 pm, using a 12-hour clock. For example, you should consider hour 8 as 8 am and hour 6 as 6pm. The program should check the validity of the inputs as follows. 1) Hours are from 0-11 (0 for noon). 2) Minutes are from 0-59. 3) The start time must be before noon. 4) The end time must not be before 1pm. The program should display specific warnings regarding the above when the user submits invalid input; the program should prompt the user to re-enter the times again. The program should output the total hours worked and the total earnings per shift. Example: >9h 20m to 6h 15m You have worked 8 hours and 55 minutes in this shift, earning $120.417 Important Notes: Please do this in C++ Programming Do not use any…arrow_forwardkindly change the program following the procedure on the problem. please list the changes you have made on the program t..thank youarrow_forwardWrite a C program to simulate tossing a “fair” coin. Allow the user to enter the number of tosses. Print the number of tosses that yield heads and the number of tosses that yield tails. What should be the percentage distribution of heads and tails? (Use the function rand_int)arrow_forward
- Jack is the head of his section. He looked tensed due to some reason. One of his friends asks him the reason. He says that he has to find the average marks out of 50 of 7 subjects because his section mentor has given him this task. But he does not know how to do this. Then his friend said that he will give him a program in C for finding the average marks of students. So, write this program in C.arrow_forwardHi, how do we go about solving this problem in Java programming language? Input The input begins with an integer 1 ≤ ? ≤ 10000, the number of frosh. For each frosh, a line follows containing the course numbers of five distinct courses selected by the frosh. Each course number is an integer between 100 and 499. Output The popularity of a combination is the number of frosh selecting exactly the same combination of courses. A combination of courses is considered most popular if no other combination has higher popularity. Output a single line giving the total number of students taking some combination of courses that is most popular.arrow_forwardWrite a program that will ask a user to input grades in Integral Calculus, Computer Programming and Physics. A grade of greater than or equal to 70 means PASSED and a grade of below 70 means FAILED. If the user has a rating of PASSED from all three subjects, the program must return a status of REGULAR. If the user has only one FAILED rating, the program must return a status of PROBATIONARY and if the user has two or more FAILED rating, the program must return a status of DISMISSED. Assume that the user will only input numerical values for their grades. 1. Type the following code on your Python script. 1 integral_calc = float(input('Input your grade in Integral Calculus: ')) 2 phys=float(input('Input your grade in Physics: ')) 3 comp_prog=float(input('Input your grade in Computer Programming: ')) 4 if (integral_calc >= 70 and phys >= 70 and comp_prog >= 70): 5 print('Congratulations, you are REGULAR!") 6 elif((integral_calc < 70 and phys < 70) or (integral_calc<70 and comp_prog < 70) or…arrow_forward
- ALL DONE IN PYTHON PLEASE!!!! In many businesses across the country, people are buying food and goods using cash. Whenever a purchase is made with cash, it is usual that change must be back to the customer. Business point of sales software help to ensure that the correct change is return to a customer by providing detailed information of the change that should be returned to the customer. using the fewest number of bills and coins. In this assignment, you are asked to use what we have covered in Modules 1-3 to design and implement a program that writes out what bills (ones, fives, tens, twenties) and coins (pennies, nickels, dimes, and quarters) that should be returned to the customer given two inputs from the user: A total cost of a sale. The amount that was paid by the customer. Ensure that your output is grammatically correct. If the customer does not provide adequate payment, you should print the following statement, the program should end. Did not receive enough cash from the…arrow_forwardLet's modify the program from this section so that the user can supply the interest rate. For very small interest rates, it may take a very long time for the balance to double. Assume the user can't wait for more than twenty years. Stop adding interest when the balance has doubled or twenty years have elapsed. 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 finaldoubleTARGET=2*INITIAL_BALANCE; doublebalance=INITIAL_BALANCE; intyear=0; Scannerin=newScanner(System.in); System.out.print("Interest rate in percent: "); doublerate=in.nextDouble(); // TODO: Count the years required for the investment to double // but no more than 20 years /* Your code goes here */ System.out.println("Year: "+year); System.out.printf("Balance: %.2f%n", balance); }arrow_forwardTeachers in most school districts are paid on a schedule that provides a salary based on their number of years of teaching experience. For example, a beginning teacher in the Lexington School District might be paid $30,000 the first year. For each year of experience after this first year, up to 10 years, the teacher receives a 2% increase over the preceding value. Write a program that displays a salary schedule, in tabular format, for teachers in a school district. The inputs are: 1. Starting salary 2. Annual percentage increase 3. Number of years for which to print the schedule Each row in the schedule should contain the year number and the salary for that year An example of the program input and output is shown below: Enter the starting salary: $30000 Enter the annual % increase: 2 Enter the number of years: 10 Year Salary 1 30000.00 2 30600.00 3 31212.00 4 31836.24 5 32472.96 6 33122.42 7 33784.87 8…arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning