Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

C++ Programming Assignment

C++ Programming Assignment

Implement the class Tiktok discussed below. You may assume both iostream and string libraries are included, youmay not use any other libraries. There are 60 seconds in a minute, 3600 seconds in an hour, 60 minutes in an hour.The 24-hour clock convention goes from 0:0:0 to 23:59:59. Read everything before starting that way you get abetter sense on what member variables you need and how you want to implement the member functions. Notethat what we expect to see in the console output is not necessarily what we may want to store as member variables.
It may be useful to recall that the modulus operator “%” can be used to obtain the remainder of integer division,also the “+” operator may be used to concatenate strings, and the function std::to_string(int) takes an integer andreturns the string equivalent of that integer, presumably for concatenating a string with an integer.

Implement the default constructor which sets the initial state of Tiktok to correspond to time 0:00:00 in 24-hourclock convention (or 12:00:00 AM 12-hour clock convention).
addSeconds adds the number of seconds passed into the function to Tiktok. If the amount of seconds to add isnegative do nothing. There is no upper limit to the amount of seconds that can be added.
addMinutes adds the number of minutes passed into the function to Tiktok. If the amount of minutes to add isnegative do nothing. There is no upper limit to the amount of minutes that can be added.
addHours adds the number of hours passed into the function to Tiktok. If the amount of hours to add isnegative do nothing. There is no upper limit to the amount of hours that can be added.
display24 prints to the console the time stored in Tiktok using 24-hour convention; with the following format:XX:XX:XX, followed by a newline.
display12 prints to the console the time stored in Tiktok using 12-hour convention. It will print AM or PMappropriately; with the following format XX:XX:XX XM, followed by a newline

Below is the class definition for Tiktok, presumably in some header file. After planning out your design declare yourmember variables in the private field of the class.
class Tiktok { public: Tiktok(); void addSeconds(int s); void addMinutes(int m); void addHours(int h); void display24() const; void display12() const; private: //TODO: Declare any member variables you think you will need.

Below is example usage for Tiktok :

void main() { Tiktok tt; // Declare an instance of Tiktok tt.addHours(48); tt.display12();// 12:0:0 AM tt.display24();// 0:0:0 cout << endl tt.addSeconds(60);tt.display12();// 1:0:0 AMtt.display24();// 1:0:0cout << endl; tt.addHours(10);tt.addMinutes(59);tt.addSeconds(59);tt.display12();// 11:59:59 AMtt.display24();// 11:59:59cout << endl; tt.addSeconds(1);tt.display12();// 12:0:0 PMtt.display24();// 12:0:0cout << endl; tt.addSeconds(11 * 3600 + 12 * 60 + 8); //11hr*3600s/hr + 12m*60s/m + 8s = 40328stt.display12();// 11:12:8 PMtt.display24();// 23:12:8cout << endl; tt.addMinutes(47);tt.display12();// 11:59:8 PMtt.display24();// 23:59:8cout << endl; tt.addSeconds(52);tt.display12();// 12:0:0 AMtt.display24();// 0:0:0cout << endl; } Implement the member functions of Tiktok below, assume this being done in a separate source file. Be as neat andsyntactically correct as possible. a) Constructor: b) addSeconds: c) addMinutes: d) addHours: e) display24: f) display12:

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Blackboard Experts only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Blackboard Experts are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Blackboard Experts is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Blackboard Experts, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.