Write a program noonsnooze.java that takes an integer command-line argument snooze and prints the time of day (using a 12-hour clock) that is snooze minutes after 12:00pm (noon).

Answers

Answer 1

A program noonsnooze.java that takes an integer command-line argument snooze and prints the time of day (using a 12-hour clock) that is snooze minutes after 12:00pm (noon) is given below:

The Code

public class NoonSnooze

{

public static void main(String[] args)

{

 int snooze = Integer.parseInt(args[0]);

 int hour = 12 + (snooze / 60);

 int minutes = 00 + snooze % 60;

 

 

 String ampm;

 if(hour%24 < 12) ampm="pm";

 else    ampm="am";

 

 hour=hour%12;

 if (hour==00) hour=12;

 

 String time = hour + ":" + minutes + " " +  ampm;

 System.out.println(time);

 

}

}

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1


Related Questions

Constructor methods should always be defined with what access? a. private b. protected c. public d. common

Answers

Constructor methods should always be defined with private access. Thus, option A is correct.

Who is Constructor?

The information elements of a specific element are often initialized by constructors, which share a same namespace as the subclass or struct.

A person who is the constructor usually have a design which is being made by him of all the amenities that he has installed with a full roof plan and floor planning.

This document is frequently considered as private as the people may misuse the information of the data that is being presented to them. Therefore, option A is the correct option.

Learn more about Constructor, here:

https://brainly.com/question/12997980

#SPJ1

one of the ways web mining improves web experiences is through site visibility. site visibility includes how and the website appears when queries are executed in a search engine.

Answers

Site visibility includes how and when the website appears when queries are executed in a search engine.

What is site visibility?

The term Site visibility is known to be called Website Visibility and this is said to be regarded as a kind of the process of obtaining your website that is said to be found on the internet if  your prospects are said to be searching for any linked or  related products and services.

Note that one of the best ways to be able to boast or increase your site visibility is to get your site to be one that is ranked first in the main search engines.

Therefore, since one of the ways web mining improves web experiences is through site visibility, Site visibility includes how and when the website appears when queries are executed in a search engine.

Learn more about visibility from

https://brainly.com/question/24029870
#SPJ1

Mystring is declared as a string and is the only variable declared. which is a valid assignment?

Answers

Since myString is declared as a string and is the only variable declared. the  valid assignment is myString = "H";

What is myString?

The term  MyString(int currentSize) is known to be a kind of a constructor that is known to be used for an empty string of the currentSize elements.

What is an Object?

The "objects" is know to be a tool that is used to make a C++ program and they are known to be called classes.

Note that  a class is said to be organized such as or the same as a data structure in C and A class is one that is made up any number of variables just similar to  a data structure, but it also has  all of the functions that work on that data.

Therefore, Since myString is declared as a string and is the only variable declared. the  valid assignment is myString = "H";

Learn more about myString from

https://brainly.com/question/27812580

#SPJ1

myString is declared as a string and is the only variable declared. Which is a valid assignment?

myString = 'Hello';

myString = Hey;

myString = "H";

myString = [Hoy];

Ups developed software called ____ to enable u.s. customs and border protection agents to inspect packages that pass through the worldport international hub in louisville.

Answers

Ups developed software called target search to enable u.s. customs and border protection agents to inspect packages that pass through the worldport international hub in louisville.

An American international shipping, receiving, and supply chain management corporation, United Parcel Service, was established in 1907. The American Messenger Firm, which first specialized in telegraphs, evolved into UPS, one of the biggest shipping couriers in the world and a Fortune 500 company.

Today, UPS is most well-known for its ground delivery services and the UPS Store, a retail network that helps UPS packages and offers equipment for small businesses.

Learn more about UPS https://brainly.com/question/27583268

#SPJ4

Which dce would you use if you wanted to extend a wired network by adding more ports?

Answers

The DCE  that a person would use if you wanted to extend a wired network by adding more ports is option a. Hub.

What is DCE in networking?

A data circuit-terminating equipment (DCE) is known to be a kind of a device that  is often used to sits between the data terminal equipment (DTE) and that of a data transmission circuit.

It is one that is also called data communication(s) equipment and it tends to act as a middle man.

Therefore, The DCE  that a person would use if you wanted to extend a wired network by adding more ports is option a. Hub.

Learn more about network from

https://brainly.com/question/1637942

#SPJ1

Which DCE would you use if you wanted to extend a wired network by adding more ports?

a. Hub

b. Switch

c. Bridge

d. Repeater

Can the word respect be turned into a different tense?

Answers

Yes, the  word respect can be turned into a different tense.

What tense is respect?

The terms respect means for a person to be humble and down to earth.

Note that the present tense is respects while the  present participle is known to be respecting, the past tense is  said to be respected and the past participle is known as respected

Therefore the Conjugation of Respect  is one that can be done into Present Continuous Tense, Present Perfect Tense as well as others.

Therefore, my response is Yes, the  word respect can be turned into a different tense.

Learn more about tense from

https://brainly.com/question/898578

#SPJ1

bring your own devices is a general term for a set of standards governing the collection and use of personal data and addressing issues of privacy and accuracy.

Answers

Fair information practices is a broad word for a set of guidelines that control the gathering and use of personal data and address concerns about accuracy and privacy. The Fair Information Practice Principles are the outcome of the Commission's investigation of the methods.

Here are the five fundamental tenets of fair information practices. First, notice should be given to customers. Second, choices should be offered and consent required. Third, data should be accessible to and modifiable by consumers. Fourth, data should be accurate and secure. Fifth, mechanisms for enforcement and redress are necessary

Learn more about code of fair information practices https://brainly.com/question/15685630

#SPJ4

a technician is configuring a new cisco 2960 switch. what is the effect of issuing the branchsw(config-if)

Answers

When you issue the BranchSw shutdown command, a physical or virtual switch interface is disabled.

Almost all Cisco devices operate on Cisco IOS and are managed using Cisco CLI. Cisco device management is made simpler by the fact that the fundamental CLI commands are the same for all of them.

The American international technological conglomerate firm Cisco Systems, Inc., also known as Cisco, has its corporate headquarters in San Jose, California. Cisco creates, produces, and markets networking tools, computer software, telecommunications gear, and other high-tech services and goods.

With industry-leading technologies like Webex, OpenDNS, and others, Cisco focuses in particular tech areas like the Internet of Things (IoT), domain security, videoconferencing, and energy management.

Learn more about Cisco https://brainly.com/question/8986399?

#SPJ4

The explosion that forces the piston downward which supplies power to a machine is ignited by the ??
A pilot light
B compression chamber
C ignition manger
D none

Answers

Answer:

Explanation:

The air and fuel in the combustion chamber is compressed as the piston moves upward. The spark plug that ignites the fuel and air results in an explosion that pushes the piston back down again.

The actual implementation of relational databases was delayed for many years after the theory was developed. what caused this delay?

Answers

The actual implementation of relational databases was delayed for many years after the theory was developed because the generation of computers didn't have the processing power and capability to make relational database software systems practical.

What is a relational database?

A relational database can be defined as a type of database that is designed and developed to store, structure and recognize relation that are existing between data points and items of information.

Based on historical records and information, we can logically deduce that the actual implementation of relational databases was delayed for several years after the theory was developed by engineers and scientist because the generation of computers at that time didn't have the processing power and capability to make relational database software systems practical.

Read more on relational database here: https://brainly.com/question/28119648

#SPJ1

If you're running a server, which one of the follow operating systems would be best suited for your server?

Answers

If you're running a server, the operating system that would be best suited for your server is Ubuntu server.

What is Ubuntu Server used for?

Ubuntu Server is known to be a type of a server operating system, that is known to have been created  by Canonical and open source programmers all over the world.

It is known to be one that works with almost any hardware or virtualization platform and as such, one can say that If you're running a server, the operating system that would be best suited for your server is Ubuntu server.

Learn more about operating system  from

https://brainly.com/question/22811693

#SPJ1

What is a CMOS Battery slot

Answers

What is a CMOS battery?
(complementary metal-oxide-semiconductor)

It is a chip on the motherboard that contains BIOS configuration, date, time and other information that the computer needs during startup. Normally, this information would be lost when the computer is shut down or loses power for some reason (dead battery, power failure, etc.). The CMOS battery supplies power to the CMOS chip, even when the computer is shut down. This battery is usually a watch type battery which can supply power for a year or more.
_____________________________________________________
Learn more about CMOS battery's:
https://brainly.com/question/14767803

Have a WONDERFUL day! (:

A technician needs to add a home wireless router. which icon should the technician select?

Answers

Answer:

Assuming they are trying to connect it to the computer, they should select the WiFi icon.

Source:
I'm an IT specialist.

The _____ was created to give a standardization to the linux filesystem structure.

Answers

The Filesystem Hierarchy Standard was created to give a standardization to the linux filesystem structure. The term "Filesystem Hierarchy Standard" refers to a convention that is applied to the UNIX operating system.

Even if they are stored on several physical or virtual media, all files and directories in the FHS are found under the root directory, which is /. Some of these folders are installed with specific subsystems, such the X Window System, in order to function on a specific system. All operating systems that resemble Unix have the majority of these directories, and they are typically utilized in very similar ways.

Learn more about linux filesystem structure https://brainly.com/question/9711472

#SPJ4

To create a new primary partition within the fdisk interactive utility, which letter should be typed?

Answers

Answer:

The letter "n".

Explanation:

Which switch is used with the windows netstat utility to show name of a running program?

Answers

Answer:

-b

Explanation:

you are attempting to boot a new system. the boot fails, and the system sounds a beep code. which of the following describes the most likely cause of this error?

Answers

The factor that describes the most likely cause of this error is:

Either no memory is installed or the memory was not detected.

What is the above case about?

A Boot Missing is known to be called a Boot Failed error and this is said to be a kind of  a Windows startup error that often shows up if  a PC or laptop fails to see or load the Windows boot files.

Note that in the case above, If the system boot fails and there is a sounds such as a beep code, the main reason for this issue will be due to absence of  memory that is installed or the memory was not seen.

If a card or memory module is said to  not been seated, or the system is one that has some  unsupported memory, the system will boots, but the display will  not show.

Hence, The factor that describes the most likely cause of this error is:

Either no memory is installed or the memory was not detected.

Learn more about boot fails from

https://brainly.com/question/10811580

#SPJ 1

See the options below

Either no memory is installed or the memory was not detected.

After a memory upgrade-ensure that the memory is compatible and was installed and configured properly.

the display will remain blank. If good fails to recognize all of the memory, the system will boot.

Answer:

Either no memory is installed or the memory was not detected.

consider the following two implementations of the same algorithm, each written in a different language. language a: calculate the average daily rainfall for the week (averagerainfall) by adding together the rainfall totals for each of the 7 days of the week (sun, mon, tue, wed, thu, fri, and sat) and dividing the sum by 7. language b: take the total amount of rain from each day of the week (sunday, monday, tuesday, wednesday, thursday, friday and saturday) and then average them together to get the average daily rainfall for the week (averagerainfall). which of the following statements about these two implementations is true?

Answers

The statement about these two implementations that is true is 3. Language B is ambiguous because the process of "average" is not explained well enough for someone to computationally be able to solve the problem.

What is an Algorithm?

This refers to the well defined steps and sequences that are used to solve a problem.

Hence, we can see that The statement about these two implementations that is true is 3. Language B is ambiguous because the process of "average" is not explained well enough for someone to computationally be able to solve the problem.

This is because it requires that cumulative number for rain per day of the following weeks and also the averages collectively that provide an overall total rainfall during the week.

Read more about algorithm here:

https://brainly.com/question/24953880

#SPJ1

Which of the following statements is true about personality
tests?
Personality tests can guide you towards the options
that may be the best fit for you.
Personality tests can predict how successful you'll be
in a specific career or field of study.

Answers

The true statement is true about personality tests is that Personality tests can guide you towards the options that may be the best fit for you.

What is meant by personality test?

Personality tests are known to be a kind of a test that has been set up to systematically bring out information about a person in regards to their motivations, preferences as well as their interests, emotional make-up, and style of communicating with people and issues.

Therefore, The true statement is true about personality tests is that Personality tests can guide you towards the options that may be the best fit for you.

Learn more about personality tests from

https://brainly.com/question/1360758

#SPJ1

A computer that has a parallel architecture uses multiple central processing units. True or false

Answers

Answer:

This is true.

Explanation:

Why would the network designers include fragmentation (segmentation) as a function instead of just requiring all packets to be a certain size? be specific.

Answers

The reason why network designers include fragmentation (segmentation) as a function  instead of just requiring all packets to be a certain size is the fact that it helps to improve security as well as make a predictable traffic flows.

An Internet Protocol (IP) process known as IP fragmentation tends to split up packets into little parts (fragments), allowing the result of those pieces to flow through a link with a smaller maximum transmission unit (MTU) than when compared to original packet size.

It is important to keep in mind that by fragmenting data packets and delivering several packets, which tend to have shorter transmission frames, there is a decreased chance that a transmission may collide with a Bluetooth packet.

The fraction of overhead bits used in the transmission tends to rise as the frame size is decreased.

Thus, rather to only requiring that all packets be a specific size, network designers incorporate fragmentation (segmentation) as a function since it enhances security and creates predictable traffic patterns.

Learn more about fragmentation:

https://brainly.com/question/26260432

#SPJ4

what is the output from the following java program? (assume that a tab is expanded into eight spaces.) public class letter {

Answers

The output from the following java program is given below:

public class Letter {

   public static void main(String[] args) {

       System.out.println("Dear \"DoubleSlash\" magazine,");

       System.out.println();

       System.out.println("\tYour publication confuses me.  Is it");

       System.out.println("a \\\\ slash or a //// slash?");

       System.out.println("\nSincerely,");

      System.out.println("Susan \"Suzy\" Smith");

   }

}

The Output

Dear "DoubleSlash" magazine,

       Your publication confuses me.  Is it

a \\ slash or a //// slash?

Sincerely,

Susan "Suzy" Smith

The given code declares variables, defines a method and gives commands..

It creates a public class and then uses print commands to tell the compiler the output to give and the output is given above.

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

Examine the following code segment:

data = 3. 16

new_data = CAST (data)

print("Length of Data:", len())

What data type (if any) should replace the word CAST on line 2 to ensure the code segment runs

without error?

O

str

O int

float

O Nothing should be changed

Answers

Answer:

float

Explanation:

I'm in python and i have a A

What is the process of ensuring anti-malware software and data is up to date. mandate daily updates.

Answers

Assuring by checking

Which of the following is NOT a long-term storage device?
Compact disc
Flash drive
Hard disk
RAM
o following us E persistent memory chips to store data

Answers

The storage device which is not a long-term storage device is: D. RAM.

Types of computer memory.

In Computer technology, there are two (2) main types of memory or storage location for software program (application) that are being used on a computer and these include the following;

Read only memory (ROM)Random access memory (RAM)

What is RAM?

RAM is an abbreviation for random access memory and it can be defined as a volatile and temporary storage (memory) location that is used for currently opened software program (application) and computer data.

In conclusion, we can reasonably and logically deduce that the storage device which is not a long-term storage device is random access memory (RAM).

Read more on RAM here: https://brainly.com/question/13748829

#SPJ1

write a program that is given two integers representing a speed limit and driving speed in miles per hour (mph), calls the function calculate ticket cost() and outputs the traffic ticket amount.

Answers

The program that is given two integers representing a speed limit and driving speed in miles per hour is given below:

The Program

def ask_limit():

  limit = float(input ("What was the speed limit? "))

   return limit

def ask_speed():

   speed = float(input ("What was your clocked speed? "))

   return speed

def findfine(speed, limit):

   if speed > 90:

       bigfine = ((speed - limit) * 5 + 250)

       print "your fine is", bigfine

   elif speed <= limit:

       print "you were traveling a legal speed"

   else:

       fine = ((speed - limit) * 5 + 50)

       print "your fine is", fine

def main():

  limit = ask_limit()

   speed = ask_speed()

   findfine(speed, limit)

main()

Read more about computer programs here:

https://brainly.com/question/23275071

#SPJ1

The word ____ is used to indicate that a program is permanently held in rom (read only memory), as opposed to being held in secondary storage.

Answers

The word firmware is used to indicate that a program is permanently held in ROM (read only memory), as opposed to being held in secondary storage.

What is a software?

A software can be defined as a set of executable instructions that is typically used to instruct a computer system on how to perform a specific task (function) and proffer solutions to a particular problem.

Types of computer memory.

In Computer technology, there are two (2) main types of memory or storage location for software program (application) that are being used on a computer and these include;

Read only memory (ROM)Random access memory (RAM)

Generally, firmware is a terminology which is used to indicate that a software program is permanently held in read only memory (ROM), as opposed to being held in the secondary storage of a computer.

Read more on firmware here: https://brainly.com/question/10875640

#SPJ1

Complete Question:

The word _____ is used to indicate that a program is permanently held in ROM (read only memory), as opposed to being held in secondary storage.

a. firmware

b. shareware

c. hardware

d. software

Which protocol enables you to control a remote computer from a local computer over a network?

Answers

Answer:

RDP

Explanation:

RDP is a secure, interoperable protocol that creates secure connections between clients, servers and virtual machines. RDP works across different Windows OSes and devices and provides strong physical security through remote data storage.

please make my answer as brainelist

The systems such as computers and telecommunications, used for storing, retrieving, and exchanging information is information technology.
true or false

Answers

The systems such as computers and telecommunications, used for storing, retrieving, and exchanging information is information technology is a true statement.

What is information technology meaning?

Information technology (IT) is known to be a broad professional form or group that tend to cover some areas of  functions such as:

Building communications networkssafeguarding data and informationTroubleshooting computer problems, etc.

Therefore, The systems such as computers and telecommunications, used for storing, retrieving, and exchanging information is information technology is a true statement.

Learn more about information technology  from

https://brainly.com/question/14688347
#SPJ1

How many bits must be reallocated from host id to network id to create 16 subnets?

Answers

4 bits is needed to be reallocated from host ID to network ID to create 16 subnets. The question is about network protocol.

An established set of guidelines that govern how data is transferred between various devices connected to the same network is known as a network protocol. In essence, it enables interconnected devices to interact with one another despite any variations in their internal workings, organizational structures, or aesthetics. Network protocols are essential to modern digital communications because they make it possible to communicate with people anywhere in the globe.

Learn more about network protocols https://brainly.com/question/13327017

#SPJ4

Other Questions
Katy invests a total of $10,500 in two accounts paying 11% and 5% simple interest, respectively. How much was invested in each account if, after one year, the total interest was $945.00.A) Enter an equation that uses the information as it is given that can be used to solve this problem. Use x as your variable to represent the amount of money invested in the account paying 11% simple interest.Equation:___________B) The answers are:$____ was invested at 11% and$____was invested at 5% read this passage: the fish swim fast, the fish swim slow. the fish, the fish, everywhere i go! which literary device is being used here? 3a + 2b c if a = 1, b = 2, and c = 3. What is the slope of a line parallel to the line whose equation is x-2y=4. Fully simplify your answer. Integrated marketing communications (imc) is different from traditional promotion mix strategy in a way that imc _____. Please help i will give brainly Jill, who seemed barely able to keep her eyes open, slowly lowered her head onto thetable. Soon drool pooled beneath her lips."1.direct characterizations2.indirect characterization What evidence does she use to support her claims? How relevant and valid do you thinkthe evidence is? How sound is her reasoning? Is there any claim that appears to beweak or unsupported? Pick one, and explain why you think so? 5. Find the product: 26.4 x 0.15A. 2.64B. 3.96C. 26.4D. 29.6please explain in number form and as little as possible but still explaining. PLEASE HELP ME!!!! A microbiologist ran some tests on pure enzymes extracted from a pathogenic bacterial strain. She found that Compound Z was a potent inhibitor of an enzyme essential for DNA replication. In subsequent tests, however, when the scientist incubated bacterial cultures in media containing high concentrations of Compound Z, she observed no effect on the bacteria. Pose a scientific question the scientist might use to pursue additional research on this topic. this visual representation shows the sets of real numbers. classify the number 25. select all terms that are correct. natural whole integer rational irrational 25 natural negative 25 whole negative 25 integer negative 25 rational negative 25 irrational negative 25 100 points plus brainlyiesthelp please questions is in the picture One of the primary benefits of using a numeric model to represent an environmental system is that ______. an equation for a line parallel to the line y = 1/3x - 4 through (-3, 2). Use vectors to decide whether the triangle with vertices p(1,-3,-2), q(2,0,-4), and r(6,-2,-5) is right-angled. A child, who is largely nonverbal, is learning to coordinate purposeful movements with sensory information, and is developing the concept of object permanence, would be in piaget's __________ stage. Marion buys three similar vanity cases to gift her air hostess colleagues.She hands over $100 to the cashier. How much did each vanity cost? At year-end, a trial balance showed total credits exceeding total debits by $5,800. this difference could have been caused by? please help me I'm struggling with my homework please, I have no clue which verb goes in them