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

  Write a recursive method

Write a recursive method that converts an integer into its English language Equivalent. intToEnglish(4500007) -> four million five hundred thousand seven

  Use a truth table to determine whether

Use a truth table to determine whether or not the following argument form is valid. You can  justify  your answer by doing the following: indicate which columns represent the premises and which represent the conclusion;

  Write a calculator program that is able to process an input

Write a calculator program that is able to process an input in postfix notation and give the result. You are free to use the built in stack class or create your own ones.

  Line of developmental training and inspirational materials

The Becoming Company is a full service provider for a line of developmental training and inspirational materials including videos, music, and books called Drive Change.

  This part along with submission

This part along with submission 6 combined make up the documentation for project proposal and implementation. You are free to extend the proposal section but you must include the sections listed in this document. Ensure that the sections are easy ide..

  Future applications will change manufacturing industry

Prepare a response which explains the future applications which will change manufacturing industry, judiciary, and field of sports. Explain at least one application for each field.

  What is the difference between using system.data

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?

  Performance of computer if main memory speed remains same

Using a faster processor chip result in corresponding increase in performance of computer even if main memory speed remains the same.

  Expalin programs like ping and some of scanning tools

When using programs such as ping and some of the scanning tools to do forensic investigations, we may easily tip off the suspect that is under investigation

  Design a class named checkingaccount

Design a class named CheckingAccount that holds a checking account number, name of the account holder, and balance.include methods to set values for each data field and a method that displays all the account information. Create the class diagram a..

  Report steps necessary evidence and protect company

Jonathan Simpson owns a construction company. Write a one-page report detailing the steps Jonathan and you need to take to obtain the necessary evidence and protect the company.

  What cryptographic techniques would be used

Alice's Remanufactured Auto Parts is located in St. Louis, Missouri. Due to the popularity of the lowered price and high quality of remanufactured parts, Alice wants to expand operations to the World Wide Web.

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