Create a Java program in jdoodle that will determine if the score is Passed/Failed. (10 is the passing score out of 20)
Instructions:
An array containing 10 predefined double values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first.
Each outputted value must also only show up to two decimal places.
Output
Multiple lines containing a float number.
5.10
5.50
4.00
4.02
3.00
3.66
2.50
2.20
1.21
a) Write a method GetOneStudent that asks a student for both of his/her WRAV101 and
WRSC111 marks (each as a real number). The method must return both of these marks. The
method must ensure that each of the marks is in the range 0 to 100.
b) Write a method CanContinue that takes as input two marks, one for WRAV101 and one for
WRSC111. Each of these marks is in the range 0 to 100. The method must return the value
true if both of these marks are at least 50, otherwise the method must return the value false.
c) Write a method DisplayDecision that takes as input two marks, one for WRAV101 and one
for WRSC111. Each of these marks is in the range 0 to 100. If the student can continue with
the second semester modules (use CanContinue above), an appropriate message and the
average mark for the two modules is displayed, otherwise the student is informed that he may
The winner is selected depending on the following rules:
Instructions:
Input
1. Option selected by Player 1
2. Option selected by Player 2
Output
If Player 1 wins, print the message "Player 1 wins!"
If Player 2 wins, print the message "Player 2 wins!"
If it's a tie, print the message "It's a tie!"
Player·1:·r
Player·2:·p
Player·2·wins!Write a two class application that has as a data member an array that can store state
area codes. The class should have a member method that enables users to test an
area code to determine if the number is one of the area codes in the state exchange.
The member method should use one of the predefined methods of the Array
class and return true if the argument to the method is one of the state codes.
Override the ToString( ) method to return the full list of area codes with each
surrounded by parentheses. To test the class, store a list of state codes in a onedimensional array. Send that array as an argument to the class. Your application
should work with both an ordered list of area codes or an unordered list
by CodeChum Admin
We're done dealing with days. It's time to step up and now deal with months!
Instructions:
Output
January·=·1
February·=·2
March·=·3
April·=·4
May·=·5
June·=·6
July·=·7
August·=·8
September·=·9
October·=·10
November·=·11
December·=·12Create three arrays of type double. Do a compile-time initialization and place
different values in two of the arrays. Write a program to store the product of the
two arrays in the third array. Produce a display using the MessageBox class
that shows the contents of all three arrays using a single line for an element from
all three arrays. For an added challenge, design your solution so that the two
original arrays have a different number of elements. Use 1 as the multiplier when
you produce the third array.
Using Pointer
The students’ IDs and test answers are
stored in a file. The first entry in the file contains answers to the test in the form:
TFFTFFTTTTFFTFTFTFTT
Every other entry in the file is the student ID, followed by a blank, fol- lowed by the student’s responses. For example,
the entry:
ABC54301 TFTFTFTT TFTFTFFTTFT
indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False, and
so on. The exam has 20 questions, and the class has more than 150 students.
Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero
points.
Write a program that processes the test data. The output should be the student’s ID, followed by the answers, followed
by the test score, followed by the test grade. Assume the following grade scale: 90%–100%, A; 80%–89.99%, B; 70%–
79.99%, C; 60%–69.99%, D; and 0%–59.99%, F.
Use Pointer
Write a program that allows the user to enter the last names of a number of candidates in a local election and the
number of votes received by each candidate. The program should then output each candidate’s name, the number of
votes received, and the percentage of the total votes received by the candidate. Your program should also output the
winner of the election. A sample output is:
Number of Candidates: 5
Candidate Votes recieve %of total vote
Johnson 5000 25.91
Miller 4000 20.73
Duffy 6000 31.09
Robinson 2500 12.95
Ashtony 1800 9.33
Total 19300
The winner of the election is Duffy!!
Toll roads have different fees at different times of the day and on weekends. Write a function CalcToll() that has three arguments: the current hour of time (int), whether the time is morning (bool), and whether the day is a weekend (bool). The function returns the correct toll fee (double), based on the chart below.
Weekday Tolls
Weekend Tolls
Ex: The function calls below, with the given arguments, will return the following toll fees:
CalcToll(8, true, false) returns 2.95
CalcToll(1, false, false) returns 1.90
CalcToll(3, false, true) returns 2.15
CalcToll(5, true, true) returns 1.05