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

which hardware component interprets and carries out

Answers

Answer:

The processor, are also called a CPU(central processing unit) is an electronic component. That interpretes and carried out the basic instruction that operates a computer

Explanation:

Como tomar captura en laptop?

Answers

Answer: En algunas laptops o PCs basta con presionar el botón Print Screen o Impr Pant, ubicado usualmente en la parte superior derecha del teclado. Se creará la carpeta de "capturas" automáticamente en Imágenes en PNG o JPG de tu ordenador. También puedes pulsar la tecla Windows junto a la tecla Impr Pant a la vez.

Explanation:

Answer:

para windows 10, encuentras el botón de windows, shift y s

Explanation:

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

You have answered 12 of 23 questions.
ing
1
Question # 13
A group of computers that share resources are called what?
2
O A server
3
O A personal computer
O A router
1
O A network
Read Question

Answers

Answer:

the answer is a network because the others are for different things

Why does your e-learning course need a title slide?

Answers

Answer:

You've probably noticed that many e-learning courses start with a title slide. ... Your title slide is important because it's the first impression users get of your course—and learners do judge e-learning courses within moments of launching them! So take the opportunity to captivate them with a great-looking title slide.

Answer:

if u don't mind I agree with above ans

Anna has a hard copy of a document. However, she needs to send the document to a customer 300 miles away in less than one hour. What should Anna do?

-Scan the document and attach the document to an e-mail.
-Convert the document to a PDF and fax it.
-Use image-editing software to enhance the document.
-Retype the document and send it as an attachment in an e-mail.

Answers

Answer:

the first one or the last one would be more helpful and useful and also easier

Explanation:

WHO IS BEST FREE FIRE PLAYER IN WORLD?

Answers

Answer:

SULTAN PROSLO

Is known to be the best free fire player.

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.

Please list 15 safety rules that you think should be practiced in the Computer Technology classroom/lab.

Answers

Answer:BE RESPECTFUL! Always treat the computer lab equipment AND your teacher and classmates the way that you would want your belongings and yourself to be treated.

No food or drinks near the computers. NO EXCEPTIONS.

Enter the computer lab quietly and work quietly. There are other groups and individuals who may be using the computer lab. Please be respectful.

Surf safely! Only visit assigned websites. Some web links can contain viruses or malware. Others may contain inapropriate content. If you are not certain that a website is SAFE, please ask a teacher or other adult.

Clean up your work area before you leave. All cords should be placed on the tables (not hanging off the sides). Headphones should be placed on the CPU/tower or monitor. Chair should be pushed under the tables. All trash, papers, and pencils should be picked up.

Do not change computer settings or backgrounds.

Ask permission before you print.

SAVE all unfinished work to a cloud drive or jump drive. Any work that is saved to the computer will be deleted when the computer is powered off or updated at the end of the day.

If you are the last class of the day, please POWER DOWN all computers and monitors.

Keep your files organized

Don’t let a student’s desktop become the digital version of his hectic book bag. Set aside a few minutes at the beginning or end of working on an assignment to ensure that students are saving unfinished work somewhere that they will be able to find it next time.

Log off

Logging off is like the digital version of cleaning up after yourself in the classroom. Students need to leave the computer ready for the next user. Logging off is also important to make sure that student work and accounts stay private.

Each person may only use one computer at a time

Computers and peripherals are not to be moved or reconfigured without approval of Lab and Classrooms staff.

Behavior and activities that disturb other users or disrupt the operations of the lab are not allowed. This includes, but is not limited to: physical activities such as "rough-housing," loud music, etc.

Children are only allowed in computer labs if they are well-behaved and supervised at all times. Children may not use the computers or occupy workstation areas. At no time are children to be left unattended.

.Explanation:

sorry about only 9 rules

What format can be applied to text in Excel?

Answers

Answer:

You can apply accounting format,date,numbers, currency, percentage or even fraction

Explanation:

write measure five safety measures can be taken to stay safe in social media​

Answers

Answer:

*Use a strong password for your accounts

*Set your account to private if given the chance to do so

*Be very selective with friend requests

*Click links with caution

* Don't over share your life

i did this Q just check it to see if its right :)
Which one is the primary storage of a computer?

Answers

Answer:

Usb drive

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...•

What is your opinion about Sophia, just a robot or human robot (explain your answer
with merits

Answers

Who’s Sophia and pls give more context
I’m sorry I don’t know who Sofia is

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:

Lonnie needs to use a special kind of block in his game that will tell him whether an object has slammed into his car true or not false what kind of block should Lonnie use

Answers

Block in programming in other to evaluate a condition such that it returns a boolean upon which a statement or action is then taken is the conditional block . Hence, Lonnie should use the conditional block.

The conditional block evaluates a condition and gives a True or False output which can the be used perform any statement or action of choice.

Lonnie could use the block as follows :

if (object_slammed_into_car) :

Statement

else :

Statement

The statement could be replaced with True, False values or any output of choice.

Learn more : https://brainly.com/question/25264145

19. WHICH KEY ALLOWS YOU TO DELETE AND TYPE OVER TEXTS? *

BACKSPAACE
INSERT
CAPS LOCK
NUMBER LOCK

Answers

The answer is Backspace

Answer: backspace

Explanation:

when you use the backspace key, the text you have already typed will delete, allowing you to type new text.

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:

Which one do we use to send signals as IR light waves?

Answers

Answer:

ir sensor

Explanation:

The characteristics of the emitters and sensors we can find the answer for sending infrared signals is:

 IR detector

The transmission of information through the air uses a variety of methods, from audible signals, infrared, microwave. Detectors in the required energy range. The emission and reception of signals requires electromagnetism that emits res in the range of energy required to have, in general the emitter and the detector must have the same spectral response range.

The emission of light signals requires sensors that emit visible light.

Infrared signal emission uses infrared detectors, for example TV remote controls.

The emission of microwave signals must use magnetrons that emit microwave, for example cell phones.

Motion detectors use multiple or pixelated sensors to detect the movement of objects.

Let's analyze the claims for the emission of IR signals.

Ambient light sensors

False. This visible range is more energy than infrared.

Remote

False. Remote controls use wavelengths between 800nm ​​to 1200nm.

IR dettector

True. IR sensors are suitable for IR signals.

Moviment detector

False. Motion sensors are sensors with multiple detectors to measure the movement of objects.

In conclusion, using the characteristics of the emitters and sensors we can find the answer for the sending of infrared signals is:

Infrared sensors in the same energy range.

Learn more here:  https://brainly.com/question/12723000

Range is an example of a ______________.
PLZ help!!!

Answers

Answer:

Function

Explanation:

In python, they use this word a lot.

The function in Python is an example of just one. Whenever called, the reach function accepts one argument. This range function accepts up to 3 arguments, but at least one must be specified when this is invoked.

It provides a process called range(). It returns a series of numbers that starts at zero and increments by one by default, stopping before the defined set.This function is most commonly used to iterate sequence types (Python range () list, string, and so on) using for and while loops.In the for loop, one of the most common uses of the range () method is to iterate through a series of variables.

Therefore, the final answer is "Function".

Learn more:

brainly.com/question/22291227

Sona wants to start a business in India. Her friend suggest an idea to her is that to start business operations through an outside service provider will help to reduce the burden. In such situation, Sona begins​

Answers

Explanation:

to try and start her business

Write a program that inputs the length of two pieces of fabric in feet and inches(as whole numbers) and prints the total

Answers

Converting from inches to feet requires a modulo operator.

The modulo operator returns the remainder of a division.

The program in Python, where comments are used to explain each line is as follows:

#This gets the input for feet

feet1 = int(input("Enter the Feet: "))

#This gets the input for inches

inch1 = int(input("Enter the Inches: "))

#This gets another input for feet

feet2 = int(input("Enter the Feet: "))

#This gets another input for inches

inch2 = int(input("Enter the Inches: "))

#This calculates the total inches, using the modulo operator

totalInches = (inch1 + inch2)%12

#This calculates the total feet

totalFeet = feet1 + feet2 + (inch1 + inch2)//12

#This prints the required output

print("Feet: {} Inches: {}".format(totalFeet,totalInches))

At the end of the program, the total feet and total inches are printed.

Read more about similar programs at:

https://brainly.com/question/13570855

You can customize backdrops in Scratch, adding text or freestyle drawings over the initial image

A.
True

B.
False

This is actually game design 20 pts and brainliest!!

Answers

Answer:

A. True

Explanation:

ive done this myself

https://scratch.mit.edu/projects/395142260/

Answer:

true

Explanation:

what is the general term for programs used to operate a computer

Answers

Answer: SOFTWARE

Explanation: Software is a set of instructions, data or programs used to operate computers and execute specific tasks. It is the opposite of hardware, which describes the physical aspects of a computer. Software is a generic term used to refer to applications, scripts and programs that run on a device.

The general term for programs used to operate a computer is "operating system" (OS). An operating system is a software that manages computer hardware and software resources and provides services for computer programs.

It acts as an intermediary between the computer hardware and the user, facilitating the execution of various applications and providing a user-friendly interface. Some popular examples of operating systems include Microsoft Windows, macOS, Linux, and Android.

Android is an open-source operating system designed primarily for mobile devices such as smartphones and tablets. It was developed by the Open Handset Alliance, a consortium of various technology companies. Android is based on the Linux kernel and has become the most widely used mobile operating system globally.

Learn more about software on:

https://brainly.com/question/985406

#SPJ6

How does a computer do its work? Mention its working principle.

Answers

Answer:

a computer run instructions (that is:code) and executes according to the set of instructions given

1.
Which of the following is a soft skill?
1 entering a customer order
2 teamwork
3 driving a forklift
4 repairing an engine

Answers

1 it is 1 I had a question just like this it 1
Out of the options listed, Teamwork is the correct answer. Soft skills are core skills, and examples are Teamwork, Critical thinking, professional writing and many more. The answer is 2. I might be wrong but I'm pretty sure #2 is correct.

state the stages step by step in the production of plastic​

Answers

Hello!!

Answer:

Plastic extrusion is the process through which plastic is heated and forced through a heated chamber by a screw.

Molding is the process of forcing plastic through a die to form the final shape of a product.

Cooling: The plastic extruded is chilled.

Spool or cut: The continuous form is either spooled or cut into lengths.

Mold construction: Small plastic pellets are melted and moulded into a hollow tube known as a parison or preform (depending on the blow molding subtype).

Molding: The parison is clamped into a mold and inflated with pressured air until it adopts the shape of the mold's interior.

Cooling and ejection: The item cools in the mold until it is firm enough to be expelled.

what corporation created what is now the most widely-used computer operating system in the world?

Answers

Answer: Microsoft windows

Explanation: Microsoft Windows is likely the most well-known and common computer operating system in the world today. It was developed by Bill Gates’ Microsoft Corporation and can run on a number of different platforms, particularly on PCs or Personal Computers.

which of the following best describes ""compilation"" in reference to computer science?

Answers

Answer:

Compilation is a computer's process of turning high-level programming languages into easily-processable computer languages.

Explanation:

One example is of HTML. If you type

<div class="col card rounded-0 m-1 text-muted tooltipster" title="Primary #FF6C6C" style="background-color: #FF6C6C"></div>

This will create a light-red block that will show it's hex code when a user hovers their cursor over that block. However for this to work the computer must take that line of code and squish it down and then stretch it out until it's just 1's and 0's so it's easier for the computer to "digest".

Guys how much would it cost if i buy a brand mew ps4 pro 2tb?

Pls i need to know

Answers

Answer:

About $490 plus tax

Explanation:

Other Questions
The degree of the polynomial function f(x) is 4.The roots of the equation f(x)=0 are 6, 2, 1, and 3.Which graph could be the graph of f(x)? Gettysburga. border stateb. bloodiest Civil War battle in the Westc. Confederate capitald. first conflict of Civil Ware. Grant victory that completed the Anaconda planf. Lee surrendered hereg. North lost here twiceh. battle where Lee gambled and losti. site of draft riotsj. Sherman's marchk. Union capital1. Union defense line Solve the equation for x. *x-3x+5 = 20 X + X = Find the missing angle measure. what happens to the i band when the sarcomere contracts plz help thisnif for a grade!. The tape diagram below represents how much time you and your friend spend time studying. You study for 45 minutes how many minutes does your friend study where can you find more information about citing sources in apa format? I'm having a brain fart rn bc this exam got my brain cells working too hardWhat does "Comment es-tu?" mean?I'm quite sure it means how are you I think but I'm probably wrong like really wrong :| How do most terrestrial primary producers make their own food? Two friends, Bart and Claudia, purchased concessions at a basketball game.Bart purchased 2 drinks and 2 candy bars for a total of $5.00.Claudia purchased 1 drink and 4 candy bars for a total of $4.75.Which statement is true?Drinks cost $1.75 each, and candy bars cost $0.75 each.Drinks cost 1 point 7 5 dollars each, and candy bars cost 0 point 7 5 dollars each.Drinks cost $0.75 each, and candy bars cost $1.75 each.Drinks cost 0 point 7 5 dollars each, and candy bars cost 1 point 7 5 dollars each.Drinks cost $1.25 each, and candy bars cost $1.25 each.Drinks cost 1 point 2 5 dollars each, and candy bars cost 1 point 2 5 dollars each.Drinks cost $1.00 each, and candy bars cost $0.75 each. How to say "I love you more than i can say" in French? how are magnetic field lines helpful when studying magnets? En el caballo mago, el joven declara: El caballo mago es mo. Por qu se siente as? Por qu tiene el cuento el ttulo Mi caballo mago en vez de El caballo mago? Cmo reconcilia el joven esta actitud con el desenlace del cuento? Can someone please help me with these answers? Find the area I will make you Brainliest (show working) In a distribution with a mean of 100 and a standard deviation of 15, the probability that a scorewill be 115 or higher is _____ Please show all your work. -95What is the quotient of??oOO3249O )122-29 H13. Stretch Your Thinking Jenny and George combined theirallowances to buy the same present for each of their fourteachers. Jenny had $13.75. George had $2.26 less thanJenny. How much did one present cost? Underline the correct word in the brackets. 1. All the mice (is/are) dead. 2. Athletics (is/are) his main interest. 3. The jury (was/were) divided in their opinions. 4. All the rice in this bag (is/are) of good quality. 5. Much of the (works/work) in our school (is/are) very easy. 6. One of the other of those fellows (has/have) stolen the ring. 7. His knowledge of many languages (was/were) really remarkable. 8. He is one of the greatest (leader/leaders) that (has/have) ever lived. 9. Mr Dev, Mrs Sharma and Miss Mary (was/were) present at the meeting 10. Each (soldier/soldiers) (was/were) present at (his/their) post. 11. Few (man/men) is/are) able to do (his/their) own cooking. 12. Either of these girls (is/are) allowed to write (her/their) name. 13. Neither of these boys (was/were) present then. 14. Several of these boys (was/were) not able to do this sum. 15. One of these (man/men) (comes/come) here daily. 16. I have (much/many) (book/books) in this box, but no one of them (is/are) interesting. 17. We have enough (egg/eggs) here, but (is/are) there enough plates? 18. Everybody in the senior classes of all schools in all countries (has/have) to learn more than one (languages/languages). 19. There (was/were) not many people present, but everyone (was/were) carrying a sword. 20. Every one of these things (belongs/belong) to me. What are the three principles of Kinetic Molecular Theory