Can someone help me code the statments in the picture?

Can Someone Help Me Code The Statments In The Picture?

Answers

Answer 1

Answer:

(In this section I will put the code with no comments and I'll put the code plus comments in the explanation below :)

public class Main

{

   public static void main(String[] args)

   {  

      double cost = ParkingSpot.getPrice(4);

      System.out.println(cost);

   }

}

//End OF Main class

//ParkingSpot class

public class ParkingSpot

{  

   public static double getPrice(int hours)

   {

   double cost = 4.25 * hours;

     

       if (cost < 7.00){

           cost = 7.00;

       }

       if (hours > 3){

           cost = cost * 0.25;

       }

       return cost;

 

   }

}

Explanation:

(Here I will add the comments so you better understand what is written and whats going on :)

public class Main

{

   public static void main(String[] args)

   {

    /* the code should be written in the ParkingSpot

      * class. You may use this main method to call

      * methods to test your code

      */

       

      /*We send an integer representing x amount of hours, also calling the

       method and displaying the result

      */

      double cost = ParkingSpot.getPrice(4);

      System.out.println(cost);

   }

}

//End OF Main class

//ParkingSpot class

public class ParkingSpot

{

   /* Finish the static class getPrice. The parameter hours indicates the time parked.

    */

   public static double getPrice(int hours)

   {

   //Here we set the rates

   /*

       It costs 4.25 per hour to park in the ParkingSpot

       If the total cost come in at less than 7.oo, the price should

           be adjusted UP to 7.00, the minimum Price Allowed

       If the number of hours is more than three hours,  

           a 25% discount should be appllied  

   */

   

   double cost = 4.25 * hours;

   

   //If the cost is less than 7.00 we set the price up to 7.00

       if (cost < 7.00){

           cost = 7.00;

       }

  /*If hours is more than 3 (meaning 4 or it would have said 3 and/or more),  

   a 25% discount will be appllied*/

       if (hours > 3){

           cost = cost * 0.25;

       }

   

   //Return cost of parking for x amount of hours

       return cost;

 

   }

}


Related Questions

Help guys thank you =) ​

Answers

1.LR
2.LR
3.HR
4.LR
5.HR

On which of the following space objects would scientists most likely expect to find life?

A
a planet with no solid surface

B
a planet with an ocean on its surface

C
a large planet very far away from the Sun

D
a small, rocky planet with no atmosphere

Answers

Answer:

B ocean planet

Explanation:

one of the criteria astronomers set to determine if a planet is habitable is the planet having liquid water on its surface.

Based on the picture above, what is the name of the processor and what is its speed

Answers

Answer:

Processor : Intel(R) Core(TM) i5-6600K

Speed : 3.50GHz

What is a Font? I need help please

Answers

Answer:

This is the answer, see which is best suited

being able to download a chapter of a new book before buying it or trying out a software option for a month before purchasing are examples of which aspect of the 4e framework?

Answers

Answer:

Experience the product

Explanation:

Being able to download a chapter of a new book before purchasing it is an example of how consumers can experience the product.

Identifica una necesidad que implique la reducción de los efectos perjudiciales relacionados al uso de los recursos energéticos.

Answers

Everything runs on energy. This includes all living things, as well as all the cars, houses, factories, lights, and appliances on which we depend. Every unit of energy we use costs us something, be it money or some other type of resource. So whenever we waste energy, we waste money or resources or both.

This is why we need to care about using energy more efficiently. Probably every one of us wastes energy in some way: by driving vehicles with a low fuel efficiency (getting less than 40 miles per gallon); living in poorly insulated houses; using energy-inefficient lighting and appliances; or leaving lights and computers on or motors running when we are not using them. Also, because our use of energy often has harmful effects on the environment, the more energy we waste, the greater is our ecological footprint.

We should also care about the sources of the energy we use. The use of any energy resource has an environmental impact. But our most widely used energy resources—nonrenewable oil, natural gas, coal, and uranium (which fuels nuclear power plants)—have large harmful environmental impacts. By shifting during the next several decades to greater use of renewable energy from the sun, wind, flowing water, and geothermal energy stored as heat in the earth's crust, we can greatly reduce these harmful environmental impacts.

When we rely more on renewable energy sources, most of which depend on energy from the sun, we are following one of nature's three scientific principles of sustainability that have sustained life on the earth for about 3.5 billion years. Some scientists argue that by following these principles, we will have a better chance of preserving our species, cultures, and economies than we will if we ignore them.

There is a great deal of evidence that certain human activities, in violation of these principles, are degrading the earth's life support system. In these activities, we are wasting huge amounts of energy and relying on environmentally harmful energy resources. The good news is that, by observing the earth's scientific sustainability principles, we can still enjoy many of the benefits of today's affluent societies without wasting so much energy and money, and we can reduce our harmful environmental impacts.

I was correcting my keyboard since the arrows had a qwerty swap, but I looked at the settings and realized I needed to change it, but I deleted the keyboard file and my keyboard stopped working, so I panicked. I'd be dead if my father saw the keyboard. What do i need to reinstall it?,,,

Answers

Answer:

Hi,

Try this link

https://certified.windowserrorhelp.com/automatically-update-device-drivers/?headline=%20Keyboard%20Drivers&logo=keyboard&gclid=CjwKCAjw5c6LBhBdEiwAP9ejG1lZr9EYilcRFp3KfYydybYMNfbWAC9-1cwynalo6vDN9R7D452qORoCC9cQAvD_BwE

Then download the thing.I promise it is secure.

Explanation:

It helps reinstall and install driver updates for windows computers. Based on the way you talked about your keyboard it seems like you have a laptop.  The link above will help you re-install and automatically update your keyboard driver. If you have a Mac or other Apple Computer you didn't delete it because Apple hardware has non-removable Drivers for their laptops. in this case there is probably a 3 party source affecting this, such as, heaven forbid, a virus, a corruption of internal storage, or a short circuit.

¿importancia del técnico de soportes en redes y sistemas informáticos?

Answers

Answer:

responsable de manejar errores de instalación, problemas del usuario y cualquier otro problema técnico que impida que el cliente utilice su producto. En esencia, el soporte técnico se centra en ayudar a los clientes a utilizar un producto de forma más eficaz.

Which of the following are characteristics of a RAW image file format? Choose all
that apply.

It is a vector graphic.

It is compressed using lossless file compression.

It is unprocessed until transferred to a computer.

It results in larger file sizes.

It is used in digital cameras to allow greater control over image processing/editing.

Answers

Answer:Which of the following are characteristics of a RAW image file format? Choose all that apply.

- It is unprocessed until transferred to a computer.

- It results in larger file sizes.

- It is used in digital cameras to allow greater control over image processing/editing.

Explanation:

cuz

It is unprocessed until transferred to a computer, It results in larger file sizes, and It is used in digital cameras to allow greater control over image processing/editing are characteristics of a RAW image file format. Hence, option C, D and E are correct.

What is RAW image?

A RAW file records the raw data from your camera's sensor because it is lossless. A RAW file, which is often referred to as a digital negative, can be thought of as the unprocessed "ingredients" of a photograph that must be further enhanced to realize its full potential.

Due to the format's ability to capture the most detail, many seasoned photographers choose to shoot in RAW. With a RAW file, it can frequently be simpler to alter exposure later.

The data from the image sensor of either a digital camera, a motion picture camera, or both is contained in a camera raw image file.

Thus, option C, D and E are correct.

For more information about RAW image, click here:

https://brainly.com/question/30024972

#SPJ2

what is the type of software that locks your device until you pay a hacker to gain access again?

Answers

I’m not 100% sure, but I think it is Malware

state the functions of the parts of the computer​

Answers

Part of computer= keyboard (it is used to enter the input to computer), mouse( it is also used as input device), monitor ( it shows output in its screen)

Differentiate between off the shelf software and bespoke software

Answers

Answer:

Custom software is specifically for the company, according to the company's way of doing business, while Off-the-shelf software is readily available and not customized. Off-the-shelf software often falls short of meeting according to specific needs as there will be a lot of unused features in this software.

11. FROM WHICH MENU WOULD YOU BE ABLE TO FIND COLUMNS? *
5 points
FILE
EDIT
INSERT
FORMA

Answers

the answer is insert

What is a special kind of block that can only give two responses?
A.
forever block
B.
conditional block
C.
loop block
D.
Boolean value

Answers

Answer:

A. forever block

Explanation:

u dont need a explaination

This feature allows you to adjust your view to see the lower and upper part of a document

Answers

Scroll bar i hope this helps :D

Answer: scroll bar

Explanation: It allows you to change your view from side to side and up and down

:D

NEED ANS ASAP THANK YOU

Answers

Answer:

1)text area

2) document view

4) title bar

6) window controls

8) command group

9) formatting toolbar

10) command tabs

11) zoom

12) scroll bars

13) toolbar

14)status bar

PLEASE HELP ME!!!!!! ITS FOR 100 POINTS AND BRAINLIEST!!!!!!!! NO ONE EVER WANTS TO ANSWER MY QUESTION!!! I JUST NEED SOMEONE TO EXPLAIN WHAT THEY'RE ASKING ME TO DO!!!!!!!!
Step 1: Read the Scenario
Because of the great work you’ve been doing for your department at running shoe company Runner Rush, your vice president has elected you to join an innovative cross-departmental team in your organization. The company is looking to launch a new shoe that enhances any runner’s speed. Management wants this new team to create an idea within a month. All the members of the team are alleviated of some of their regular job duties in order to join several meetings a week to brainstorm and design the new product.

Step 2: Develop a Month Plan
You have been appointed as the team leader. Develop a month plan that you will present to your teammates at the initial meeting. Focus on developing a strong team dynamic, setting goals, expectations, deadlines, and other elements that will lead the team to success. Make sure that your plan is easy to follow and clearly outlines all the required information.

Answers

Answer:

be creative

Explanation:

being creative helps you and our time brainstorm some good ideas that will help you succeed and allow your team mates to have a voice too if you follow these you will be a good team leader

i dont know if  if this the answer that your looking for but i hope it help

Answer:

Do what you do best

Explanation:

Thats all i can say just do what you are good at and you can go places

The _____________________ search is a very simple algorithm. Sometimes called the ________________________ search, it compares each element with the value being searched for, and stops when either the value is found or the end of the array is encountered. Group of answer choices

Answers

Answer:

linear search

sequential

Explanation:

Compare and contrast the advantages and disadvantages of a LAN to a WLAN.
Please someone answer I need the answers urgently.

Answers

Answer:

A LAN (local area network) is a group of computers and network devices connected together, usually within the same building. ... A WAN connects several LANs, and may be limited to an enterprise (a corporation or an organization) or accessible to the public. The technology is high speed and relatively expensive.

LAN stands for Local Area Network. WLAN stands for Wireless Local Area Network. ... WLAN connections are completely wireless. LAN network is a collection of computers or other such network devices in a particular location that are connected together by communication elements or network elements.

Easy and Cheap Communication: Data and messages can easily be shared with the other computer connected to the network. Centralized Data: The data of all network users can be stored on a hard disk of the central/server computer. This help users to use any computer in a network to access the required data.

Explanation:

I don't know if it's correct,

so hope it helps

The slogan "You deserve a break today" is an example of a

Answers

Answer:

c trademark

Explanation:

An analog video is a video signal transmitted by an analog signal, captured on a (blank)

Answers

Answer:Analog component signals are comprised of three signals, analog R′G′B′ or YPbPr. Referred to as 480i (since there are typically 480 active scan lines per frame and they are interlaced), the frame rate is usually 29.97 Hz (30/1.001) for compatibility with (M) NTSC timing.

Explanation:

sharing resources.
b) What do you say for the picture given?
2) Write the advantages of
computer
networks
5

Answers

Answer:

Explanation:

2- Multitasking Multitasking – Multitasking Multitasking is one among the main advantage of computer. ...

Speed – Now computer isn't just a calculating device. ...

Cost/ Stores huge – Amount of knowledge it's a coffee cost solution. ...

Accuracy – ...

Data Security – ...

Task completer – ...

Communication – ...

Productivity –

More items...•

According to which virtue do you need to secure information by limiting computer access to authorized personnel only?

Answers

Answer:

Confidentiality is a virtue which states that you need to secure information by limiting computer access to authorized personnel only.

Why do careers change over time? How do you think current trends such as new technology or the shift to working from home will impact interior design careers? Provide at least two specific examples.

Answers

Answer: I think Careers such as working in stores and other basic careers may change over time because it’s not always the best way to make money and sometimes if the career trends are for a new technology peoples careers may change over time because they’re working on something else

Explanation:

Carlos had 194 seeds and 11 flower pots he put the same number of seeds in each flower pot which is the best estimate for the number of seeds in each flower pot a.10 b.20 c.30 d.40

Answers

Answer:

20?

Explanation:

Answer:

yes, 20 is the answer you make 194 and divide it equily.

Explanation:

60 POINTS
Complete the sentence.
When we use the internet, our personal information becomes ________.
A. public
B. accessible
C. private

Answers

Answer:

Answer should be accessible .

Answer:

accessible

Explanation:

got it right on edge

How many times faster is a computer that measures at
30 teraflops compared to a computer that runs at 15 megaflops.

Answers

well Its something soooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

you can resize a row in a table by dragging the ____.

Answers

Answer:

desk

Explanation:

You need more backround information i dont know what u talking about

Consider the binary number 1100.a) If you add a zero to the left of the number

(01100) does the value of the binary number change? Explain why or why not

with complete explanations

Answers

Answer:

no

Explanation:

The value represented by the added zero is 0·2⁴, which is of course 0.

In the unlikely situation where the binary number is only 4 bits wide, adding a value would be impossible.

what maintains data about various types of objects, events, people, and places?

Answers

Database,A data made management system,data element,

There are numerous components that maintain data about various types of objects, events, people, and places. They are known as databases, data management systems, and data elements.

What do you mean by Database?

A database may be defined as a systematic collection of data that is significantly stored and accessed electronically by a user. After storage, it can be retrieved or extracted when the user requires it for their need. It holds a complete set of files, folders, documents, etc. in an organized manner.

Apart from databases, data management systems are the framework system for gathering and interpreting large volumes of data across an organization in a sequential manner. It basically includes software tools for its proper management.

A data element is a fundamental unit of data that has some precise meaning and functional property in order to classify data on the basis of some criteria or characteristics.

Therefore, there are numerous components that maintain data about various types of objects, events, people, and places. They are known as databases, data management systems, and data elements.

To learn more about Databases, refer to the link:

https://brainly.com/question/518894

#SPJ6

Other Questions
help plz i will give brainliest Need help on this question please! how did the aztecs bring freshwater to tenochtitlan? A shipment of sugar fills 2 4/5 containers. If each container holds 2 3/7 tons of sugar, what is the amount of sugar in the entire shipment?Write your answer as a mixed number in simplest form. serve(s) to increase cellular surface area.O plasma membranesO integral proteinsO microvillio intracellular fluid AM I RIGHT PLEASE HELP!!! Calculate the slope of a line that passes through the points (6, -12) and (15,-3). see screenshot below/above the probability distribution of all possible values of the sample proportion is the Identify the name of the ionic compound with the formula MgS. Group of answer choices magnesium sulfide magnesium sulfite magnesium sulfate magnesium sulfur Which RNA nucleotide is complementary to thymine?adenineuracilguaninecytosine How many solutions does this equation have?9p + 5 = 5 + 9p 1000 Chevrolet times 1000 Lamborghini Rohan practice hard every night and hope to make the first team in the future is it simple or compound or complex sentence 1.35 - 0.829 SHOW YOUR WORK Choose the algebraic expression that matches the phrase below. h increased by 5 Which of the following candidates would be most prepared for a career in academia?Jamie, who recently graduated with her bachelor of arts in astrophysicsSam, who has a masters in engineering and needs to stay near home to care for a sick family memberSharon, who has a PhD in chemistry and is willing to move to any city for a jobMiguel, a senior in high school with the highest SAT score on record which characters sing the duet ""l ci darem la mano"" from don giovanni? Plz help10 points and a brainliest the measure of an angle is 14 degrees less then the measure of its complement . Find the measures of the two angles 20% of 400 is.............