Implement a class Quiz that implements the Measurable interface. A quiz has a score and a letter grade (such as B ). Use the implementation of the DataSet class to process a collection of quizzes. Display the average score and the quiz with the highest score (both letter grade and score).

Answers

Answer 1

Answer:

Explanation:

The following code is written in Java. The Measurable Interface and DataSet classes/Interfaces were found and implemented as requested. Then the rest of the code was created to work with and around those two methods to accomplish the task of Display the average score and the quiz with the highest score (both letter grade and score)

package sample;

interface Measurable {

       double getMeasure();

       String getGradeString();

}

class DataSet

{

   private double sum;

   private Measurable maximum;

   private String grade;

   private int count;

   public DataSet()

   {

       sum = 1;

       count = 0;

       maximum = null;

   }

   public void add(Measurable x)

   {

       sum = sum + x.getMeasure();

       if (count == 0 || maximum.getMeasure() < x.getMeasure())

           maximum = x;

           grade = x.getGradeString();

       count++;

   }

   public double getAverage() {

       return sum / count;

   }

   public Measurable getMaximum()

   {

       return maximum;

   }

}

class Quiz implements Measurable

{

   private double score;

   private String grade;

   public Quiz(double aScore, String aGrade)

   {

       this.score = aScore;

       this.grade = aGrade;

   }

   public double getMeasure()

   {

       return score;

   }

   public String getGradeString() {

       return grade;

   }

}

class QuizTester

{

   public static void main(String[] args)

   {

       DataSet quizData = new DataSet();

       Quiz q1 = new Quiz(85, "B");

       Quiz q2 = new Quiz(93, "A-");

       Quiz q3 = new Quiz(78, "C+");

       quizData.add(q1);

       quizData.add(q2);

       quizData.add(q3);

       System.out.println("Maximum: " + quizData.getMaximum().getMeasure() + ",  " + quizData.getMaximum().getGradeString());

       System.out.print("Average: ");

       System.out.printf("%.2f", quizData.getAverage());

   }

}

Implement A Class Quiz That Implements The Measurable Interface. A Quiz Has A Score And A Letter Grade

Related Questions

Write a program that will read two floating point numbers (the first read into a variable called first and the second read into a variable called second) and then calls the function swap with the actual parameters first and second. The swap function having formal parameters number1 and number2 should swap the value of the two variables

Answers

Answer:

In Python:

def swap(number1,number2):

   a = number1

   number1 = number2

   number2 = a

   return number1, number2

   

first = float(input("First Number: "))

second = float(input("Second Number: "))

print("After Swap: "+str(swap(first,second)))

Explanation:

The swap function begins here

def swap(number1,number2):

This saves number1 into variable a

   a = number1

This saves number2 into number1

   number1 = number2

This saves a (i.e. the previous number1) to number2

   number2 = a

This returns the numbers (after swap)

   return number1, number2

   

The main begins here

The next two lines prompt the user for first and second numbers

first = float(input("First Number: "))

second = float(input("Second Number: "))

This calls the swap function and print their values after swap

print("After Swap: "+str(swap(first,second)))

What are some common predefined number formats used in the United States? Check all that apply.
ratings
zip codes
kilograms
phone numbers
Social Security numbers
employee numbers

Answers

Answer:

B)__(Zip Codes)

D)__(Phone Numbers)

E)__(Social Security Numbers)

Which equipment is a standalone recorder?

Answers

Answer:

i think its Pro tool

Hopes it helps you

Question #4
Multiple Choice
You are going to open a file in your program.
aFile = open("___", "r")
Which statement is true about what goes in the blank?
O The text file must be in the same folder as the program.
O You can use the relative path to a subfolder within the folder where the program is saved.
O You must use backward slashes.
O The full path needs to be provided.

Answers

Answer:

You can use the relative path to a subfolder within the folder where the program is saved.

Explanation:

edge 2021

please remember to read the questions thoroughly bc in this class they give very similar questions with slight differences.

have a lovely day <3

The true statement about what goes in the blank is you can use the relative path to a subfolder within the folder where the program is saved. The correct option is B.  

What is data file handling?

Data is permanently stored in a storage device using files. The ability to save program output in a file and execute various operations on it is made possible by file handling.

A device's input and output actions are carried out on a stream, which is an abstraction of that device. The method for storing a program's output in a file and assisting with various operations on it is known as file handling in C++.

These data are stored permanently on a storage device thanks to files. Known facts or information are frequently referred to as "data."

Therefore, the correct option is B. You can use the relative path to a subfolder within the folder where the program is saved.

To learn more about data file handling, refer to the link:

https://brainly.com/question/29524491

#SPJ5

what is convergence ​

Answers

Answer:

the process or state of converging.

Explanation:

Answer:

the fact that two or more things, ideas, etc. become similar or come together.

Which of these conclusions supports the fact that Eclipse is categorized as an IDE?


The user cannot use cheat sheets because it is frowned upon.

The user must get used to a proprietary and unique menu system.

The user must specify the programming language he or she wants to use.

The user must have a high level of expertise before quality results can be obtained.

Answers

Answer:

The user must specify the programming language he or she wants to use.

Explanation:

Lena is completing her senior year of college and is living in an apartment with three friends. Her family has a subscription to HBO Go, and Lisa is able to use the log-on ID and password while she’s at college. Lena does not have cable TV or satellite TV as she typically streams shows or movies that are available online for free or through HBO Go. Several of Lena’s friends don’t have a subscription to Hulu, so Lena has given them her log-on ID and password so they can watch their shows. She doesn’t mind sharing the HBO Go subscription with her friends—what could it hurt? She has heard that the entertainment industry and HBO Go are upset over people sharing their subscription to the streaming services in this way. Lena’s sharing of her family’s HBO Go subscription is an example of:________
a) streaming piracy
b) illegal sharing
c) consumer copying
d) consumer misbehavior
e) digital stealing

Answers

Answer:

d) consumer misbehavior

Explanation:

This is an example of consumer misbehavior. What Lena is doing is not technically piracy or illegal because HBO has created the family feature on their accounts for the account to be used by multiple people at the same time. Yet, the feature was not intended to be used by individuals that are not technically family or even under the same roof. Therefore, what Lena is doing goes against HBO's reason for this feature and sharing the account as Lena is doing is ultimately hurting HBO's streaming service.

Which of the following characterizes how an enabled security program might react to a new program installation on a computer system?


It might alert you to space requirement excesses.

It might report an error or tell you that the file is corrupted.

It might protect the new installation from getting viruses.

It might automatically set a restore point for the computer system.

Answers

Answer:

It might automatically set a restore point for the computer system

Answer:

It might report an error or tell you that the file is corrupted.

Explanation:

Use the drop-down menus to match each description to the correct term.

Has records and fields:
Has columns and rows:
Enables a user to interact with a database without working directly with data:
Works like a dialog box:
An interface that makes it easier for inputting data into a database:
Enables you to search several tables for data:

Answers

The application software Cermine is used to record data, query the database to find specified data, format the display of a database object, and search for data entry. Other part of the question is discussed below:

What are the perfect match of the given words?

Application Software Cermine: Matching the items with the best options

To answer this question, you need to match each description on the left with the corresponding item on the right:

The first description is "A collection of records" which matches with "record".

The second description is "A data retrieval tool that finds specified data within a database" and this matches with "query".

The third description is "The display format that you choose when working with a database object on the screen" and this matches with "form".

The fourth description is "All of the fields for a single database entity" and this matches with "record".

The last description is "A data entry tool you use to input data into a database" and this matches with "Search".

Therefore, The application software Cermine is used to record data, query the database to find specified data, format the display of a database object, and search for data entry.

Learn more about Programming:

brainly.com/question/23275071

#SPJ3

a worldwide system of computer network​

Answers

Answer:

The internet is a worldwide system of computer network.

Which file type is used when forwarding a contact as a business card to another user to share their information?
PST
CSV
XML
VCF

Answers

Answer:

VCF

Explanation:

Answer:VCF

Explanation:

What is the diagram of a combination circuit that accepts a 3 bit number and generates an output binary number equal to the square of input number?​

Answers

Answer:

see picture

Explanation:

Disclaimer: I didn't design this; I found it.

Search for "3 bit square circuit".

Jobs with only 7 letters

Answers

Answer:

nursing

Explanation:

it's needs 20 words so don't mind thisssss part hehe

Answer: Teacher!!!!!!

What are the uses of an interface in encapsulation?

Answers

Answer:

As you can see in the above examples, encapsulation is implemented in Java using interfaces, classes, access modifiers, setters and getters. A class or an interface encapsulates essential features of an object. Access modifiers (private, public, protected) restrict access to data at different levels. I don't know If this helps

Ans: As you can see in the above examples, encapsulation is implemented in Java using interfaces, classes, access modifiers, setters and getters. A class or an interface encapsulates essential features of an object. Access modifiers (private, public, protected) restrict access to data at different levels.

What is the most likely reason a user would export data with the formatting in place?

A) The fields will not have any errors.

B) The file will be much easier to read.

C) The file is automatically spellchecked.

D) The columns are automatically alphabetized.

Answers

Answer:

its d

Explanation:

Answer:

its b on edge

Explanation:

believe me if youre a viber

For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises, this exercise is going to have 3 levels in the hierachry.
At the top is the Animal class. Below that, we are going to have a subclass for Pets. Under pets, we are going to have 2 subclasses, Dogs and Fish.
You will need to create your class hierarchy and add instance variables, getters, and setter methods to accommodate the following information:
I need to save what type of animal I have (String variable)
I want to be able to save a name for my fish and dog (String variable)
I want to know which fish need salt water v. fresh water (String variable)
I want to know if my dog has been trained (boolean variable)
I want to know the size of my dog and fish (String variable)
Make sure you use common sense names for your variables!
public class Animal
{
}
public class Fish extends Pet public class Pet extends Animal public class Dog extends Pet
{ { {
} } }

Answers

Answer:

vehicle super class 9.1.4

Explanation:

So you need to create a super class containig all the animals use the class above for referance

How Charles Babbage Concept of
Computer has help the modern
Computer​

Answers

English mathematician and inventor Charles Babbage is credited with having conceived the first automatic digital computer. During the mid-1830s Babbage developed plans for the Analytical Engine. Although it was never completed, the Analytical Engine would have had most of the basic elements of the present-day computer.

Amaya is curious how her computer actually boots up. Which of the
following should Amaya research to find out more?
hard drive
O RAM
OROM
O CPU

Answers

She should press OROM

Answer:

Options 1, Ram

Explanation:

That's how a computer works.

What are some common uses of Excel?

Answers

Answer:

to make a spread sheet and to make sure you have all of the sum and didn[t miss a number

Explanation:

When handling a project scope creep, which are two things that all parties involved need to be aware of

Answers

Answer:

Additional resource needed for the projects

Additional time needed for the project

Explanation:

In any project handing their will expected diversion and add on requirement, so to complete a project additional time and additional resource is required to finish a project.

As advice due the project details, end user has keep enough buffer for deviations on resource of man power and additional times taken to finish the project.

While design the project each scope of work is measure with additional time to complete the task

Each scope of work is considered as task in project management.

Explanation:

in a swap you need a variable so that one of the values is not lost ? Need help

Answers

Answer:

In a swap, the variable is cuttly.x

Explanation:

Answer:

temp

Explanation:

Which of these titles will work in Java syntax?


hello world

Helloworld

helloworld

HelloWorld

Answers

Answer:

I am pretty sure it is D, "HelloWorld"

Answer:

HelloWorld is the answer

Explanation:

Remember Java syntax for naming projects and classes: begin with a capital letter, and then capitalize the first letter of each new word.

How is binary used in pixels and in sound?

Answers

Answer:

Sound needs to be converted into binary for computers to be able to process it. To do this, sound is captured - usually by a microphone - and then converted into a digital signal. The samples can then be converted to binary. They will be recorded to the nearest whole number.

Explanation:

is this it?

Answer:

Sound needs to be converted to binary.

What are examples of Table Tools options that can help edit data?

Answers

Answer:

1 - change views

2 - change fonts

3 - add controls

4 - insert rows and columns

5 - add existing fields

6 - change margins

7 - view the property sheet

8 - change padding

Answer:

properties

add and delete

before change

Explanation:

1. Mrs. Bautista has a bank balance of -42 dollars at the start of the month. After she
deposits 6 dollars, what is the new balance?​

Answers

Answer:

- 36

Explanation:

-42 + 6 = -36

Mrs. Bautista is kinda broke

Suppose you have a sentineled, doubly-linked list class as specified in project 2 and an object of that class called my_list. The function below finds and returns the first index of a specified value in that list, but portions have been removed. Using the minimum possible spacing at all in your answers, fill in the missing code. This algorithm does not employ the __iter__ and __next__ methods of the Linked_List class. Also note that this exercise does not include the object names, so your answers should include my_list. as appropriate. Finally, none of your responses should contain colons. As a reminder, the linked list implementation provides the following methods: insert_element_at(value, index) #cannot be used to append
append_element(value)
get_element_at(index)
remove_element_at(index)
__len__ #support for the len method to obtain the list's size
def index_of(my_list, val):
for k in :
if :
raise ValueError
and what is the performance?

Answers

Answer:

def index_of (my_list, val):

  for k in range(my_list.__len__):

      if my_list.get_element_at(k) == val :  

          return k

Explanation:

The python function "index_of" accepts two arguments, a list and the value to be searched for.

The for-loop iterates over the list using the "__len__" magic method to return the index of the searched term in the list if present.

Define the Database ​

Answers

A structured base in a computer

7. Write a python program to get the following output.
1-----99
2-----98
3-----97
. .
. .
. .
98-----2
99-----1
whats is the code of this question

Answers

Answer:

for i in range(1,100):

print(f"{i}-----{100 - i}")

OR:

for i in range(1,100):

print(str(i)+"-----"+str(100 - i)")

Explanation:

First off, we can see that the program starts off with an iteration of 1 and ends at 100. So we use this loop code to begin:

for i in range(1,100):

Then, we use this code to print the pattern (make sure to indent this):

print(str(i)+"-----"+str(100 - i)")

We can also use f-strings as a better and cleaner alternative (make sure to indent this too):

print(f"{i}-----{100 - i}")

This code will get us the output shown in the question.

Select the correct statement(s) regarding direct sequence spread spectrum (DSSS) and orthogonal frequency division multiplexing (OFDM).
a. OFDM is not classified as a spread spectrum technique, although OFDM has the effect of spreading the signal over a larger frequency spectrum
b. OFDM has greater spectral efficiency compared to DSSS
c. DSSS relies upon a PN code that is only shared by the transmitter and receiver pair
d. all statements are correct

Answers

Answer:

a. OFDM is not classified as a spread spectrum technique, although OFDM has the effect of spreading the signal over a larger frequency spectrum.

Explanation:

Orthogonal Frequency Division Multiplexing is a technique in which large digital data is sent over radio waves by splitting it into multiple subcarriers. The data is then transmitted to different users who can access the files. OFDM is not a spread spectrum technique, it is based on large frequency spectrum.

If you do not have the latest Java SDK in place when you download the Eclipse IDE, you will have to download the program again.


True

False

Answers

Answer:

True

Explanation:

Other Questions
Ralph is arranging a wedding reception. He can spend no more than $8000. It costs $6000 to rent the hall and $25 to feed each guest. Ralph needs to know how many guests, at most, can attend the reception. Write an inequality to represent this situation. Evaluate -x^2+4x+1 when x=-2 Mike is studying the phylogenetic tree for big cats.A big cat phylogenetic tree is shown. A bracket goes to clouded leopard and to another bracket. That bracket goes to 2 additional brackets. One bracket goes to tiger and snow leopard. The other bracket goes to janguar and another bracket. The other bracket has lion and leopard.He made several statements about the tree. Which statement is not true?The leopard is more closely related to the jaguar than to the snow leopard.The leopard is more closely related to the tiger than to the clouded leopard.The leopard is more closely related to the snow leopard than to the clouded leopard.The leopard is more closely related to the tiger than to the snow leopard. Which item follows HTML instructions to assemble web pages?o Client o Search Engineo Web Browsero Web Server For the given cost function C ( x ) = 19600 + 500 x + x 2 , First, find the average cost function. Use it to find: a) The production level that will minimize the average cost Can someone please answer these?17. Una bebida = blank18. Es un da soleado. = blank .19. 15.515 = blank Find the circumference of the circle below A gui allows you to interact with objects on the screen such as icons and buttons true or false the equations in the triangle consist of (2x +1) and (5x +5) Circles C and D overlap. The distance from point C to point D is 7 centimeters. What is the sum of the areas of circle C and circle D? 7Pi units squared 14Pi units squared 49Pi units squared 98Pi units squared HELP ME DO THIS PLZ Match the following. 1. the horizontal axis on the coordinate plane origin 2. the horizontal distance from the y-axis; written first in an ordered pair x-coordinate 3. a two-dimensional system in which a location is described by its distance from two intersecting, perpendicular axes ordered pair 4. the four sections of the coordinate plane x-axis 5. the vertical axis on the coordinate plane coordinate plane 6. the intersection of the x-axis and y-axis y-axis 7. the vertical distance from the x-axis; written second in an ordered pair quadrants 8. a group of two numbers written in the order (x, y), where the first value represents a horizontal position and the second value represents a vertical position y-coordinate Which equation describes a line withy-intercept (0,5) that passes throughthe point (2, 1)? A self-aldol or crossed aldol reaction REQUIRES a(n) ___________________. Group of answer choices strong acid only a very, very strong base, such as LDA (lithium diisopropyl amide), NaOH or LiOH won't work acid catalyst a strong base such as LiOH or NaOH PLEASE HELP ASAP!! WILL MARK BRAINLIESTMatch the points on the number line with the rational numbers they represent.ABCDE1.3-1.71.7-0.8-0.2 Which statement best describes these two molecules? Which of the following roofs would be considered sustainable? (Select all that apply.)O saddleO solardomedgreen Section: 4: Interpret:Which of the following statements are TRUE for the child dependency ratio for the Midwest region?Select all that applyOA. There are approximately 30 children for every 100 workers in the Midwest region.OB. There are 298 children for every 1000 workers in the Midwest region.C. 29.8% of the workers are children in the Midwest region.D. 29.8% of the people are children in the Midwest region.E. There are 298 children for every 1000 people in the Midwest region.OF. None of the above statements is true.Which of the following statements are TRUE for the old-age dependency ratio for the Midwest region?Select all that applyA. There are approximately 20 elderly for every 100 people in the Midwest region.B. 19.7% of the workers in the Midwest region are elderly.C. There are 197 elderly for every 1000 people in the Midwest region.D. There are 197 elderly for every 1000 workers in the Midwest region.OE. 19.7% of the people in the Midwest region are elderly,OF. None of the above statements is true.Which of the following statements are TRUE for the age dependency ratio for the Midwest region?Select all that applyOA. There are approximately 50 dependents for every 100 workers in the Midwest region.OB. For every 1000 people in the Midwest region there are 495 dependents.C. 49.5% of the workers in the Midwest region are dependent.OD. 49.5% of the people in the Midwest region are dependent.E. Approximately 50 workers in the Midwest region are dependent.F. For every 1000 working people in the Midwest region there are 495 dependents.O G. None of the above statements is true,Section: 5: Extend: Please help due soon.(No Links Allowed) plzzzz help reeeeeeeee