Create a class that simulates an alarm clock

Assignment Help Basic Computer Science
Reference no: EM13232923

create a class that simulates an alarm clock. In this class you should *store time in hours, minutes, and seconds. Note if time is am or pm. (hint: you should have separate private members for the alarm and the clock. Do not forget to have a character variable repersenting am or pm) *initialize the clock to a specified time. *allow the clock to increment to the next second (you need to take into account things like if the clock's time is 11:59:59 AM and you increment by a second, the time will be 12:00:00 PM. You may need to consider some iterated if statements.) *set the alarm and have the alarm print "Wake Up" when the set time is reached. (you may wish to create a private function that provides the wished-for print out when the alarm time is reached and the alarm clock is on) *display the present time. *use the class in a program that uses the functions requiring displaying of time and setting of the alarm. Include 2 constructors. One constructor should be the default constructor that will initialize the object to 12:00:00 AM. The second constructor should take parameters for hours, minutes, seconds, and AM/PM. Both constructors will provide the private members with the time. In addition, have both constructors set the alarm clock as off. (you will need a Boolean variable that determines whether the alarm is on or off) . The function or method you use to set the alarm will set the alarm on.

Reference no: EM13232923

Questions Cloud

Explain why is the presence of non-atomic species : why is the presence of non-atomic species, such as metal oxides, detrimental to an analysis using atomic spectroscopy. which type(s) of atomizers can suffer from this effect and why.
Write program that reads length and width of a rectangular : Write a program that reads in the length and width of a rectangular yard (in meters) and the length and width of a rectangular house (in meters) placed in the yard.
Explain the fatty acids : You decide to study fatty acid metabolism in cells that areactively synthesizing fatty acids. For your experiments, you have a number of tracer molecules labeled with carbon-14
Explain astronaut''s energy comes from burning glucose : assume that an astronaut's energy comes from burning glucose(c6h12o6). write 3 equations (including delta H values that represent the heats of formation for each C6H12O6, H20 and CO2.
Create a class that simulates an alarm clock : create a class that simulates an alarm clock. In this class you should *store time in hours, minutes, and seconds. Note if time is am or pm. (hint: you should have separate private members for the alarm and the clock.
Explain reactions carried out at a constant temperature : Consider the following reactions carried out at a constant temperature and pressure. In which of these will the amount of work done be positive, only the coefficients of the reactants are given. All species are gas unless otherwise noted.
Why brownstowns management was reluctant to release info : A combination of low prices with strong competition by foreign competitors and so-called "legacy costs" of unions are cited as the primary reasons why so many steel companies are filing for bankruptcy. In 2002, as Brownstown Steel Corp.
What changes to each products price should domino sugar make : Domino Sugar Is considering the purchase of Fisher Honey Co. for $100 million. Based on information obtained from 500 supermarkets around the country, when 1 lb. of Domino Sugar went o sale from $2.00 to $1.50,
State the structures of the organic products : Write the structures of the organic products that will be formed when methyl benzoate is treated with lithium aluminum hydride and the reaction mixture is worked up with aqueous acid.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Implement the intrusion detection system

Company is trying to decide whether to implement the intrusion detection system (IDS), or intrusion prevention system (IPS).

  Explaining quasi-legal activities over internet

Online gambling and buying of pharmaceutical drugs over the Internet are quasi-legal activities which can only take place as Internet allows the parties offering gambling.

  An msp430-based system interfaces 4 external devices

An MSP430-based system interfaces 4 external devices (ED0, ED1, ED2, ED3), each capable of generating an interrupt request.

  Recursive multiplication

Recursive Multiplication Write a main program that uses a recursive function. This function accepts two arguments into the parameters x and y.

  Convert the star schema to a snowflake schema

Using these principals, convert the star schema to a snowflake schema. What impact (if any) does this have on the size of the fact table for this problem?

  See hidden file by looking at floppy using windows explorer

Would you see hidden file by just looking at the floppy using Windows Explorer? Why or Why not? What other tools could you use to retrieve evidence?

  Find out the average cpi for the two executables compiled

Consider a program compiled using compilers A and B running on the same processor. Find out the average CPI for the two executables compiled by compilers A and B given that the processor has a clock cycle time of 1ns.

  User interface design guidelines used for new system

Design a suitable source document for ads that are telephoned or mailed in. Suggest at least four user interface design guidelines that could be used for the new system.

  How assembly language program is created-debugged-editors

Explain how the assembly language program is created and debugged by using system tools like editors, assemblers.

  Write the communication in the neuron work

Write down the communication within the neuron work? Write down the communication between the neuron work?

  Expert systems created-deployed in real-world applications

Expert systems have been created and deployed in many real-world applications to support decision making. Discover one recent case study or academic journal article.

  Suppose a c++ compiler for the mips

Suppose a C++ compiler for the MIPS machine associates $s5 with array a and $s6 with variable i. How does it translate a[i] = a[i+1]; into MIPS assembly language?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd