Partner Exercise: Implement a class Car with the following properties. A car has a certain fuel efficiency (measured in miles/gallon or liters/km – pick one) and a certain amount of fuel in the gas tank. The efficiency is specified in the constructor, and the initial fuel level is 0. Supply a method drive that simulates driving the car for a certain distance, reducing the amount of gasoline in the fuel tank. Also supply methods getGasInTank(), returning the current amount of gasoline in the fuel tank, and addGas(), to add gasoline to the fuel tank. Sample usage: Car myHybrid = new Car(50); // 50 miles per gallon myHybrid.addGas(20); // Tank 20 gallons myHybrid.drive(100); // Drive 100 miles double gasLeft = myHybrid.getGasInTank(); // Get gas remaining in tank You may assume that the drive method is never called with a distance that consumes more than the available gas. Supply a CarTester class that tests all methods.

Answers

Answer 1
50:20 I got it right

Related Questions

I NEED HELPS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! UWU

jeremy has a handful of resisters and all of them except one have for bands the exception has three why?

Answers

Answer:

The 3 band resistor does not specify the tolerance.

Ususally this means the tolerance is 20%, which is not great.

Explanation:

The last band is typically the tolerance band, i.e., the lower the tolerance the more accurate the value as indicated by the other bands. In case of a 3 band code, there is no tolerance specified and you have to assume the default of 20%.

Which of the following describes the phishing method of information security crime?


physically interacting with the victim and using her computer when she is not looking

rifling through recycling bins to find account information

pretending to be someone else when asking for information

all of these

Answers

Answer:

pretending to be someone else when asking for information

A program that will ring a bell six times is what kind of program?
A. Edited
B. Iterative
C. Selection
D. Sequence

Answers

Answer:

D

Explanation:

because it is a sequence it does more than one thing

Answer:

B

Explanation:

I took the test

____________________________ and _________________________ are 2 positive impacts of the internet on businesses.

A)Competition and Easy Marketing


B)Improved Communication and Worrying security


C)Improved Communication and Increased unnecessary competition


D)Improved Communication and Easy Advertisement

Answers

D improved comms and easy ads

Answer:

D)due to it we can have more profit with less time and wide area communication

What is the primary purpose of a slideshow presentation

Answers

Answer:

to help us to complete all of useless project given by school

Answer:

support the presenter's ideas

Explanation:

When a called function completes its task, it normally:_________a. logs its results b. terminates program execution normally c. aborts program execution d. returns to the calling function

Answers

Answer:

sorry this is tought

Explanation:

no idea

What are some areas in Computer Science that make use of multivariate statistical testing or MCM methods? Explain why they are used.

Answers

Explanation:

Computational modeling is one of the areas of Computer Science that uses mathematical systems to perform multivariate statistical tests to solve highly complex problems in multidisciplinary areas, such as medicine, engineering, science, etc.

An example of the use of multivariate statistical tests is social development research in social science, which uses multiple variables to find more hypotheses and greater coverage between variables.

Multivariate statistical tests have the benefit of making research more effective and providing a more systematic and real view of the study.

PowerPoint is a visual aid for many speakers. Discuss some points to remember when adding text to a PowerPoint presentation. How do they help make the experience better for the audience and the presenter? What things can you do when creating a PowerPoint presentation to assure that your work adds to the speaker’s presentation without detracting attention from the speaker?

Answers

Answer:

Use a lot of spinning animations to draw attention. Use many colors. A lot of text so you can read from the slide in case you get lost.

How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? A.
in pixels
B.
in inches
C.
as percentages
D.
in em units

Answers

Answer:

It's D: in em units

Explanation:

Plato

What computer part it this? Explain to get brainliest. People that don't explain, won't get it, but will get a thanks + a 5 star rate.

Answers

Answer:

That is a motherboard, a circuit board containing the main components (CPU, RAM, etc) of a computer. It contains connectors in which other circuit boards can be slotted into.

Explanation:

A motherboard is a specialized circuit board (a thin board containing a electrical circuit) used for containing major components of a computer and allowing the parts to be used in conjunction with each other. This is why you'll find a motherboard in a large variety of computers, from phones, to PC's and laptops.

Answer: Motherboard.

Explanation: it's the backbone of a computer, it ties all the computers components together.

What number will be output by the console.log command on line 5

Answers

Answer:

-2

Explanation:

PLZ HELP!!!!!!!!! XC

what dose it mean if a circuit is hot to the touch

Answers

Answer:

The circuit is carrying more than it is supposed to and is overheating.

The series is overloaded

A Computer Programmer who wants to be surrounded by a large number of like-minded coworkers should take a job with one of the nation’s largest

A)retail sellers of computers and related accessories.
B)in-store computer repair and service companies.
C)developers of computer operating systems.
D)makers of computer networking equipment.

Answers

Answer:

C

Explanation:

This job will have the largest amount of 1. computer programmers, 2. like-minded coworkers, and 3. a large number of like-minded coworkers.

Please give Brainliest if accurate!

The Computer Programmer who wants to be surrounded by a large number of like-minded coworkers should take a job with developers of computer operating systems.

What is  the term like-minded?

The Definition of the term like-minded is known to be when two or more people like or have the same purpose, habit or thought.

Therefore we can say that The Computer Programmer who wants to be surrounded by a large number of like-minded coworkers should take a job with developers of computer operating systems.

Learn more about Programmer from

https://brainly.com/question/23275071

#SPJ2

What is the capacity of a disk with two platters, 10,000 cylinders, an average of 400 sectors per track, and 512 bytes per sector?
What is the use of cache memory? Explain the concepts of cache hit and cache miss.

Answers

Answer:

The capacity of the disk is "40 GB".

Explanation:

Given value:

[tex]\to \text{cylinder}= 10,000\\\\\to \frac{sector}{track} = 400\\\\\to \frac{bytes}{sector} = 512\\[/tex]

[tex]\text{Calculating the size of track} = \frac{bytes}{sector} \times \frac{sector}{track}[/tex]

                                            [tex]= 512 \times 400 \\\\ = 204,800 \ \ Or \ \ 200 \ K[/tex]

[tex]\text{Calculating the size of surface} = \frac{byte}{track} \times \ cylinder[/tex]

                                               [tex]= 2000 \ K \times 10,000 \\\\ = 20, 000,000 \ K[/tex]

[tex]\text{Calculating the capacity of a disk} = \frac{byte}{surface} \times \frac{surface}{disk}[/tex]

                                                     [tex]= 20, 000,000 \ K \times 2 \\\\ = 40, 000,000 \ K \\\\= 40 \ GB[/tex]

Cache memory is often used to speed up the runtime. It will enable us to improve performance unless we can store information, that is retrieved constantly in memory space.

Hit Cache: when the Processor relates to representing database data, Cache Hit results. Miss Cache: when this Processor responds to a non-present cache data, this will trigger its miss of cache.It doesn't have to retrieve the Main Memory through secondary storage.

What kind of skill is persuasion?


neutral skill

hard skill

soft skill

high skill

Answers

Answer:

soft skill

Explanation:

you are packing a mobile phone containing a lithium ion battery and you get a prompt on the screen to put a lithium ion label on the box. You have run out of such labels and have only lithium metal labels left. what should you do?

Answers

Answer:

Do not use such labels because they may be misleading and are unethical.

Explanation:

Note, there is a big difference in design between the two terms or labels. Lithium metal batteries are non-rechargeable batteries. In other words, they cannot be recharged after they run down. For example, most watches, calculators, or car keys are made of lithium metal batteries.

While Lithium-ion batteries (or Li-ion batteries) are rechargeable batteries , and they are commonly used by mobile phones, laptops, and other gadgets.

Therefore, with such differences in mind, it may be very misleading when someone in possession of the mobile phone sees the lithium metal labels; then thinks the battery is non-rechargeable.

There are different instructions that comes with labeling, lithium metal label  is quite different from Lithium-ion labels and as such one cannot use one for the order.

What one should you do is to never use the lithium metal labels in place of  Lithium-ion labels. It is better to go and get the required label. If not found, the mobile phone should not be packaged for transport.

One has to comply with the regulations regarding batteries and the packaging of lithium batteries.

Lithium Metal Batteries  are known as primary battery. That is, they are non-rechargeable. They are said to have lithium metal or lithium compounds in them.

They have high energy density than other lithium batteries.   They can be found in Watches , Calculators etc.

Lithium-ion batteries are known to be  secondary battery. That is, they are said to be rechargeable in nature. They can be found  in Mobile phones, Laptops etc.

When shipped, any packages that has lithium-ion batteries must be labeled with  UN3480  or UN3481.

When shipped, any packages that has lithium metal batteries must be labeled  with UN3090  or UN3091.

Learn more about Batteries from

https://brainly.com/question/24876978

Suppose that one of the following control signals in the single-cycle MIPS processor has a stuck-at-0 fault, meaning that the signal is always O, regardless of its intended value. What instructions would malfunction? Why? (a) RegWrite (b) ALUOp1 (c) MemWrite Repeat for all three signals (a) to (c) above, assuming that the signal has a stuck-at-1 fault.

Answers

Answer:

Explanation:

RegWrite:

• All R-type instructions, lw and addi:

• The result of the operation/load/addition would not be written back to the destination register

• ALUOP

• The following R-type instructions: add, sub, and, or, slt

• With ALUOp stuck at 0, the ALU decoder would interpret all those instructions as either add or subtract operations. The ALUOp gets decoded to add or subtract depending on ALUOp[0].

• MemWrite:

• Only sw is affected.

• The memory write won’t take place.

What are the ten main components of a report that would be delivered at the end of a data science project?

Answers

Answer:

The answer is below

Explanation:

The ten main components of a report that would be delivered at the end of a data science project are the following:

1. Cover page: the involves elements such as the title of the project, the name of the author, name of institution, date of publication

2. Table of Contents: this comprised information like chapters, topics, and subtopics

3. Abstract: a summary of the whole project

4. Introductory Section: a brief background study

5. Methodology section: this describes the methods used in gathering and analyzing the data

6. Data section: this shows the data gathered for the project. It is mostly represented in tables, histograms, pie charts, etc.

7. Analysis section: this describes what was analyzed

8. Result section: this described the outcome of the analysis

9. Conclusion section: this describes the whole outcome of the data project and what the author derived or concluded.

10. References: this describes the information about the works of other authors, the author used in building his background knowledge towards his data science project.

Given main(), complete the Car class (in file Car.java) with methods to set and get the purchase price of a car (setPurchasePrice(), getPurchasePrice()), and to output the car's information (printInfo()).
Ex: If the input is:_______.
2011
18000
2018

Answers

Answer:

Explanation:

This a java code for a car and can be written as follows:

public class Car {

   private int modelYear;

   private int purchasePrice;

   private int currentValue;

   public int getModelYear() {

       return modelYear;

   }

   public void setModelYear(int modelYear) {

       this.modelYear = modelYear;

   }

   public int getPurchasePrice() {

       return purchasePrice;

   }

   public void setPurchasePrice(int purchasePrice) {

       this.purchasePrice = purchasePrice;

   }

   public int getCurrentValue() {

       return currentValue;

   }

   public void calcCurrentValue(int year) {

       int age = year - modelYear;

       currentValue = (int) Math.round(purchasePrice * Math.pow(0.85, age));

   }

   public void printInfo() {

       System.out.println("Car's information:");

       System.out.println("   Model year: " + modelYear);

       System.out.println("   Purchase price: " + purchasePrice);

       System.out.println("   Current value: " + currentValue);

   }

}

Which of the following online activities seem appropriate for the workplace? (select all that apply) A.watching a webinar to learn new job skills
B.watching TV online
C. seeking donations to support your election to the Senate
D. reading press releases from your company's competitors
E. sharing career advice with your peers
F. sharing company secrets in a public forum​

Answers

Answer:

A, D, and E

watching a webinar to learn new job skills

reading press releases from your company’s competitors

sharing career advice with your peers

Explanation:

got it right on edge2020

The online activities that seem appropriate for the workplace  is sharing career advice with your peers.

What are virtual activities?

The virtual activities are known to be any kind of online activities that is often done by people to make sure they have good and continued collaboration with other people.

Conclusively, Note that the use of online activities in the workplace should be the one that will help you and your peers to grow such as  sharing career advice with your peers.

Learn more about  online activities  from

https://brainly.com/question/13171394

Pleases Help ME An example of a _________________ impact is when a product is back ordered and the business contacts the customer via email to let them know of the new ship date.


A)Negative



B)Positive

Answers

Answer:

positive

Explanation:

it shows good customer service

Write a function that takes in two parallel lists: a list of times (in increasing order), and a list of distance traveled by that point in time. The function should return a new list giving the average velocity between consecutive time measurements. The new list should have length one less than the original lists.

Answers

Below is the function that takes two parallel lists;

List of times in increasing order and that of distance travelled by that point in time.

I put into consideration the instructions given in the question.

ANSWER;

def find_velocity(time, distance):

velocities = []

for i in range(1, len(time)):

velocities.append((distance[i] - distance[i - 1]) / (time[i] - time[i - 1]))

return velocities

times are = [1, 3, 5, 7]

distances are = [25, 29, 35, 70]

print(find_velocity(times, distances))

Why would a programmer use a flow chart? (Edge2020 Coding Critical Thinking Questions)

Answers

Answer:

As a visual representation of data flow, flowcharts are useful in writing a program or algorithm and explaining it to others or collaborating with them on it. You can use a flowchart to spell out the logic behind a program before ever starting to code the automated process.

Explanation:

Answer: I answered yo can give the other guy brainliest yw

Explanation:

plssss help i will mark u as brainliest plssss ​

Answers

Answer:

Explanation:

<p style="color: red">Random Name 1</p>

<p style="color: blue">Random Name 2</p>

<p style="color: yellow">Random Name 3</p>

<p style="color: green">Random Name 4</p>

<p style="color: gray">Random Name 5</p>

<ol>

   <li>Pen 1<li>

   <li>Pen 2<li>

   <li>Pen 3<li>

<ol>

<ul>

   <li>CPU<li>

   <li>Motherboard<li>

   <li>RAM<li>

   <li>GPU<li>

<ul>

I think is this you need, have a nice day ;)

How does natural gas move through pipelines from the well head to the end user thousands of miles away

Answers

It’s the large compressors that are pumping and working together through the different stations ... They move the gas through the pipelines which they’re under high pressure.

PLEASE I NEED HELP NOW!!!!!


Frank types in many numbers to calculate baseball statistics. To enter these numbers, he should use the _____.

Answers

Answer:

Numeric keypad

Explanation:

The numeric keypad has mostly only numbers so it would be more convenient for him.

Hope this helps!

Answer:

Numeric keypad on the right side of the keyboard.

Explanation:

Ap*x

During periods when the internet is not slowed by congestion, the number of internet searches is probably close to the socially efficient number. how can we tell this this is true?

Answers

Answer:

We can this is true because the number of internet searches that are being done at that time is just enough to meet the actual capacity of the internet facility.

Explanation: Socially efficient number is that number that is just enough to meet the actual capacity of a given system such as an internet connectivity or internet facility.

When the number of internet searches are just enough not to cause congestion in the search engines or internet facility,it can be said that the socially efficient number has been achieved.

Help I’ll mark you brainly!

Answers

1. shapes

2. Shapes are classified and have a certain look. Forms are mostly organic and don't have a specific form.

3. value and depth

4. yellow, blue, red

5. orange, green, purple

6. opposite each other

7. right next to each other

9. tint-lightness  shade - darkness

10. value

Have a great day!

~PumpkinSpice1

P.S.~ I take Digital arts so I know all the answers :) I just finished my color unit.

Range is an example of a ______________.

Answers

Answer:

example in ( 4,6,9,3,7) lowest value is 3and highest is 9.

how to create diagram that demonstrates the step
by step procedures in performing a mail merge.

Answers

Answer:

hope it helps

1-Creating a Main Document and the Template.

2-Creating a Data Source.

3-Defining the Merge Fields in the main document.

4-Merging the Data with the main document.

5-Saving/Exporting

Other Questions
In an animal shelter, the ratio of dogs to cats is 5 to 3. There are 25 dogs. Write and solve a proportion to find the number c of cats? I need help ASAP ... Cul es tu asignatura favorita en la escuela? El mo es espaol Which line fits the scatter plot better? Manufacture Definition What is the value of (3.4)2 HELP RIGHT NOW PLEASE! The perimeter of the rectangle below is 94 units. Find the length of side PS. Write your answer without variables In a memory study, participants are taught a word-learning strategy in a college classroom. Prior to entering the classroom, each participant is required to wait for ten minutes in the hallway outside the classroom. One week later, a researcher contacts them and asks them what they did while they were waiting. Which type of long-term memory were the researchers eliciting Can you help me please and thank you 1) f(x) = - x2 + 4x - 10Find f(5) Which religion blends beliefs and practices from a diverse set of local religions? O A. Buddhism O B. Christianity O C. Chinese folk religion O D. Islam SUBA The Jimenez family is bringing 12 packages of hamburger and hotdog buns to the neighborhood picnic. The hamburger buns cost $2.00 per package. The hot-dog buns cost $1.50 per package. They spent $20 for the buns. Create and solve a system of equations that can be used to find the number of packages of each type of bun purchased. -4x 3 y 2(7xy 4) i need help 5.For each equation, determine if x = 2 is a solution. Explain or show your reasoning.a.-2(x 4) = 4b.26= 13C.-3.8x = -7.44(x - 1) 3(x - 2) = -8d. The coldest temperature last December was 18.24 degrees. The difference between this and the highest recorded temperature was 56.24 degrees. What was the highest recorded temperature? In a newspaper, it was reported that the number of yearly robberies in Springfield in 2012 was 90, and then went down by 50% in 2013. How many robberies were there in Springfield in 2013? III. Your uncle is telling you to do things that you are already doing. Answer him using thepresent progressive and double object pronouns, following the example. Write only onesentence for each thing he says. Make sure you have at least two examples of each form:attaching the pronouns to the present progressive, and placing the pronouns before the verb.Watch out for accent marks! (16 points; 4 points each)Example: Treme el peridico. Ya te lo estoy trayendo or Ya estoy trayndotelo.8. Lvanos los platos.9. Preprame un caf.10. Ordename la vaca.11. Dinos la verdad. (TCO C) For several years, Mountain Home University had used IBM computers. Recently, Apple Computers offered them a better machine at lower a price for one of the University's labs; however Mountain Home did not buy them because the _____ costs were too high.a. transactional.b. opportunity.c. marginal.d. switching. 5/6 divided by 11/13 Select all the correct answers.Terry is an up-and-coming florist who specializes in weddings. He uses 5 roses, 3 daisies, and 4 bundles of green filler to make one bouquet. If r is the cost of a rose, d is the cost of a daisy, and f is the cost of a bundle of green filler, which expression represents the cost for making 75 bouquets?75r +75d + 75f + 12(5r + 3d + 4f) + 7575(5r) + 75(3d) + 75(4f)75(5r + 3d + 4f) WILL GIVE BRAINLIEST!!!!When answering the question Where? in an anecdote, what should you remember about the form?a.) An anecdote happens in one place during one brief time period.b.) An anecdote is less about setting than about character development.c.) An anecdote should include flashbacks to other periods of time.d.) An anecdote's setting should shift often from place to place.