Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

It's to be written in C++. You will be writing a program that will prompt the user for a date and a time. For the date, the user will be asked to enter in three integers (month, day, year). There will be four functions related to the date:

1.string getMonth() - Prompts the user for an integer resembling the month.

The function should then check the integer value and return the string

correlated to the month.

2.int getDay() - Prompts the user for an integer resembling the day and returns

the integer.

3.int getYear() - Prompts the user for an integer resembling the year and returns

the integer.

4.void displayDate(string month, int day, int year) - Displays the date in this

format: October 18, 2012

Next, the user will be asked to enter the time, which is to be then converted from military time and displayed. There will be three functions related to the time:

int getHours() - Prompts the user for an integer resembling the hour of the day in military time. If the user enters 23, the function should return 11. If the military time entered is >=12, set the global boolean variable PM to be true, else false. int getMinutes() - Prompts the user for an integer resembling the minutes and returns that integer. void displayTime(int hour, int min) - This function will check if the global boolean variable PM is true. If it is true, display the time in this format: 12:34 PM. If PM is false, display the time as so: 11:34 AM

For each "get" function, there should be an input-validation loop. The purpose for this lab is to allow you to become more comfortable with declaring functions, calling functions, and defining functions.

The output should be similar to the following:

Please enter in the month: 10

Please enter the day of the month: 18

Please enter the year: 2012

Please enter the hour in military format: 23

Please enter the number of minutes: 34

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91521853
  • Price:- $30

Guranteed 24 Hours Delivery, In Price:- $30

Have any Question?


Related Questions in Computer Engineering

A group of students made the following scores on a 10-item

A group of students made the following scores on a 10-item quiz in psychological statistics: {5, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10} What is the variance, treating these scores as a sample?

Question 1 identify the three main types of computer

Question: 1. Identify the three main types of computer software that were discussed in your unit lesson. Within the three main categories, give examples of each and a brief explanation of each. Each explanation/descripti ...

Describe some of the advantages and disadvantages of using

Describe some of the advantages and disadvantages of using the N-version programming approach.

Xl cos dividends are expected to grow at a 20 rate for the

XL Co.'s dividends are expected to grow at a 20% rate for the next 3 years, with the growth rate falling off to a constant 6% thereafter. If the required return is 14% and the company just paid a $3.10 dividend, what is ...

Question suppose there are 150 users sharing a

Question : Suppose there are 150 users sharing a communication link. Suppose each user transmits data only 12% of the time. Give the (compact) formula for finding the probability that at most 20 users are transmitting si ...

Suppose that a large integer k is represented in twos

Suppose that a large integer k is represented in two's complement form. It may be negative, zero, or positive. We say that k is even if and only if |k| mod 2 = 0. How can we quickly test if k is even without using arithm ...

A study was conducted of long beach school district schools

A study was conducted of Long Beach School District schools regarding how many require school uniforms. In 2006, of the 296 schools questioned, 184 said they required s school uniforms. (Gentile & Imberman, 2009) Find th ...

How could legislation impact on operations within your

How could legislation impact on operations within your organisation in relation to innovation, project management, and operational planning? Briefly outline any relevant requirements (e.g. intellectual property, WHS).

Solve the question given belowwhat is the relative market

Solve the question given below What is the relative market share for the top three cell phone service providers in the united states? The response must be typed, single spaced, must be in times new roman font (size 12) a ...

Question suppose your computer is able to test 50000

Question Suppose your computer is able to test 50,000 passwords per second. If the password were 8 bytes long (a-z, A-Z, 0-9), what year will the password be cracked through brute force (Show your work)? Assume 1) you we ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As