Concept explainers
Write a grading
- Two quizzes, each graded on the basis of 10 points, are given.
- One midterm exam and one final exam, each graded on the basis of 100 points, are given.
- The final exam counts for 50 percent of the grade, the midterm counts for 25 percent, and the two quizzes together count for a total of 25 percent. (Do not forget to normalize the quiz scores. They should be converted to percentages before they are averaged in.)
Any grade of 90 percent or more is an A, any grade between 80 and 89 percent is a B, any grade between 70 and 79 percent is a C, any grade between 60 and 69 percent is a D, and any grade below 60 percent is an F.
The program should read in the student’s scores and display the student’s record, which consists of two quiz scores, two exam scores, the student’s total score for the entire course, and the final letter grade. The total score is a number in the range 0 to 100, which represents the weighted average of the student’s work.
Define and use a class for the student record. The class have instance variable for the quizzes, midterm, final, total score for the course, and final letter grade. The class should have methods to compute the overall numeric grade and the final letter grade. These last two methods will be void methods that set the appropriate instance variables. Remember, one method can call another method. If you prefer, you can define a single method that sets both the overall numeric score and the final letter grade, bet if you do this, use a helping method. Your program should use all the methods described here. Your class should have a reasonable set of accessor and mutator methods, whether or not your program uses them. You may add other methods if you wish.
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Concepts Of Programming Languages
Starting Out with Programming Logic and Design (4th Edition)
Software Engineering (10th Edition)
Starting Out with C++: Early Objects (9th Edition)
- Decryption Key A|B|C| D|E|F|G|H|I|J|K|L|M N|O|P|Q|R|S|T|U|V|W|X|Y|Z (letter above equals below, and vice versa) As you can see, A becomes N, B becomes O and so on. Your job is to write a program, with at least four functions, including main, which must do the following: 1. Ask user whether they want to encode or decode a message - if no, then terminate 2. Take the input string from the user, store it in dynamic memory (use new) 3. As appropriate, encode or decode the message using Rot13. 4. Output the encoded/decoded message 5. Delete the input string from dynamic memory (use delete)arrow_forwardWhere is the second part of this assignmentarrow_forwarduse visual basic Depreciation to a Salvage Value of 0 . For tax purposes an item may be depreciated over a period of several years, n . With the straight-line method of depreciation , each year the item dpreciates by 1/nth of it original value. with the double-declining-balance method of depreciation, each year the item depreciate by 2/nths of its value at the beginning of that year.(In the final year it is depreciated by its value at the beginning of the year. ) Write a program that performs the following tasks:(a) Request a description of the item, the year of purchase, the cost of the item, the number of years to be depreciated (estimated life), and the method of depreciation. The method of depreciation should be chosen by clicking on one of two buttons.(b) Display a year- by-year description of the depreciation. See Fig. 6.15 .arrow_forward
- Summary Interest on a credit card's unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance = (netBalance * d1 payme If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: interest averageDailyBalance * 0.0152 Instructions Write a program that accepts as input netBalance, d1, payment, d2, and interest rate per month ( interestRate).arrow_forwardMatlab: Please write the codes on matlab, I don't want a manual solution.You can see pic.arrow_forwardDo not use AI or chatGPT etc. for answering!!!!!!!arrow_forward
- a) In the Hi-Lo game, the player begins with a score of 1000. The player is prompted for the number of points to risk and a second prompt asks the player to choose either High or Low. The player’s choice of either High or Low is compared to random number between 1 and 13, inclusive. If the number is between 1 and 6 inclusive, then it is considered “low”. A number between 8 and 13 inclusive is “high”. The number 7 is neither high nor low, and the player loses the points at risk. If the player had guessed correctly, the points at risk are doubled and added to the total points. For a wrong choice, the player loses the points at risk. Create a HiLo application based on this specification. Application output should look similar to: b) Modify the application to allow the player to continue until there are 0 points left. At the end of the game, display the number of guesses the user took before running out of points. This is my code I just need part b import java.util.Random; import…arrow_forwarda) In the Hi-Lo game, the player begins with a score of 1000. The player is prompted for the number of points to risk and a second prompt asks the player to choose either High or Low. The player's choice of either High or Low is compared to random number between 1 and 13, inclusive. If the number is between 1 and 6 inclusive, then it is considered "low". A number between 8 and 13 inclusive is "high". The number 7 is neither high nor low, and the player loses the points at risk. If the player had guessed correctly, the points at risk are doubled and added to the total points. For a wrong choice, the player loses the points at risk. Create a HiLo application based on this specification. Application output should look similar to: High Low Gane RULES 1 through 6_are lou Nunbers 8 through 13 are high Number ? is neither high or low You have 1000 points. Enter points to risk: 500 Predict (1=High, 0=Low): 0 Nunber is 4 You win. Play again? y You have 2808 points. b) Modify the application to…arrow_forwardBroken Cabins Problem Statement: There is an Office consisting of m cabins enumerated from 1 to m. Each cabin is 1 meter long. Sadly, some cabins are broken and need to be repaired. You have an infinitely long repair tape. You want to cut some pieces from the tape and use them to cover all of the broken cabins. To be precise, a piece of tape of integer length t placed at some positions will cover segments 5,5+1-sit-1. You are allowed to cover non-broken cabins, it is also possible that some pieces of tape will overlap. Time is money, so you want to cut at most k continuous pieces of tape to cover all the broken cabins. What is the minimum total length of these pieces? Input Format The first line contains three integers n,m and k(1sns10°, namsloº, Isksn) - the number of broken cabins, the length of the stick and the maximum number of pieces you can use The second line contains n integers bl,b2,bn (Isbism) - the positions of the broken cabins. These integers are given in increasing…arrow_forward
- Python Answer Required: A Rajesh teaches a cooking class. The course is attended by NN students, numbered 11 to NN. The cook must participate in the presence before each class, i.e. call out the names of the students one by one and indicate which students are present. Each student has a first and last name. To save time, Rajesh only wants to call up students' first names. However, if there are multiple students with the same first name, the Rajesh must call out the full names (first and last names) of all those students. For any student who does not share a first name with any other student, the cook can still only call that student's first name. Help the Rajesh decide for each student whether to call that student's full name or just their first name. Input 1 1 hasan jaddouh Output hasanarrow_forwardPart 2 onlyarrow_forwardPython code Screenshot and output is mustarrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning