Write a program in C++. Program Information You recently visited a clock shop and it started you thinking about a virtual clock shop -- perhaps for internet clock sales. Folks could come in (connect to the site) and see how the clocks behaved (alarms, ticking, etc.). Hmm...how to do it? Aha! All clocks share common attributes, you realize. The different clocks behaviours can be implemented as different methods in each particular clock sub-class. The common attributes in super-classes. It's a tremendous idea! Hmm...what kinds of attributes do clocks have? Well, they all have a type of power source (battery, solar, pendulum, etc.) and a 'name' (grandfather, alarm, sundial, watch, clock-radio, etc.). They all tell the time (hour, minute, second). They all have a 'face' where they display this time. And then there are sub-groups of clocks which share attributes. All alarm clocks have a time at which the alarm will go off (at least one). All grandfather clocks chime some tune. All watches have some sort of band or chain to connect them to the person wearing them. And finally the lowest level groupings like clock-radios, CD-clocks, cuckoo clocks, etc. Other features which might be more sporadically supplied are: military/12-hour switchability, multiple alarms, temperature, date, sleep timer, etc.   Remember, don't try to do graphics and sound here. Think display a message to get my information across. Perhaps a 'tick-tock' message to show a clock is working. Perhaps a line from a song for the grandfather or clock-radio. Perhaps a 'beep-beep-beep' or 'clang-clang' for an older alarm. Or maybe a 'Ask NOT for whom the bell tolls! It tolls for thee!' for a themed alarm clock. Visitors to your shop could play with individual clocks to see the feature list, set the alarm and see what it 'sounds' like, see how it displays its time (and date?), etc. Randomly create clocks to fill your shop. Then let the user search through them with a simple menu interface. Place the clock hierarchy in a library (clocks?) for eas

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a program in C++.

Program Information

You recently visited a clock shop and it started you thinking about a virtual clock shop -- perhaps for internet clock sales. Folks could come in (connect to the site) and see how the clocks behaved (alarms, ticking, etc.). Hmm...how to do it?

Aha! All clocks share common attributes, you realize. The different clocks behaviours can be implemented as different methods in each particular clock sub-class. The common attributes in super-classes. It's a tremendous idea!

Hmm...what kinds of attributes do clocks have? Well, they all have a type of power source (battery, solar, pendulum, etc.) and a 'name' (grandfather, alarm, sundial, watch, clock-radio, etc.). They all tell the time (hour, minute, second). They all have a 'face' where they display this time.

And then there are sub-groups of clocks which share attributes. All alarm clocks have a time at which the alarm will go off (at least one). All grandfather clocks chime some tune. All watches have some sort of band or chain to connect them to the person wearing them.

And finally the lowest level groupings like clock-radios, CD-clocks, cuckoo clocks, etc.

Other features which might be more sporadically supplied are: military/12-hour switchability, multiple alarms, temperature, date, sleep timer, etc.

 

Remember, don't try to do graphics and sound here. Think display a message to get my information across. Perhaps a 'tick-tock' message to show a clock is working. Perhaps a line from a song for the grandfather or clock-radio. Perhaps a 'beep-beep-beep' or 'clang-clang' for an older alarm. Or maybe a 'Ask NOT for whom the bell tolls! It tolls for thee!' for a themed alarm clock.

Visitors to your shop could play with individual clocks to see the feature list, set the alarm and see what it 'sounds' like, see how it displays its time (and date?), etc.

Randomly create clocks to fill your shop. Then let the user search through them with a simple menu interface. Place the clock hierarchy in a library (clocks?) for easy re-use.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education