Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

could you eplain the source code line by line? I am typing the question and the uploading the source code image. (USE C++ PROGRAMMING LANGUAGE)

could you eplain the source code line by line? I am typing the question and the uploading the source code image.

(USE C++ PROGRAMMING LANGUAGE)

Object Orientated Programming

Use Object Oriented Design (OOP),

Use Constructors, Parameters, and arguments as needed.

Have the user input number of seconds. Convert number of seconds to days, hours, minutes, and remaining seconds up to 7 days. If the number of seconds is greater than 7 days do not convert and print a message user entered seconds greater than 7 days.

Create a main function to control the operation of the program. If the user inputs a second amount for conversion less than or equal to 0 the program should prompt the user again for input.

Implement setter and getter methods as needed.

Only output days if there are enough seconds for 1 day.

Days

Hours

Minutes

Seconds

Only output hours if there are enough seconds for 1 hour.

Hours

Minutes

Seconds

Only output minutes if there are enough seconds for 1 minute.

Minutes

Seconds

Attach the Source Code and Output below.

image text in transcribedimage text in transcribed

#include 2 using namespace std; 4 const int HRS-PER-DAY = 24; 5 const int MIN-PER-HR-60; 6 const int SEC-PER-MIN = 60; 8 class SecondConversion 10 11 private: 12 long int seconds,input seconds; 13 int days, minutes,hours; 14 15 public: void Display (long int input seconds) 16 17 18 days input-seconds / SEC-PER-MIN / MIN-PER-HR / HRS-PER-DAY; 19 20 if (days>7) 21 cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

1 0 8 .

Answered: 1 week ago