Reference no: EM13861095
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
What is the formula for finding omitted
: What is the formula for finding omitted variable bias with multiple regressors?
|
Deacon publishing house is a publishing company
: Deacon Publishing House is a publishing company that produces consumer magazines. The house and home division which sells home improvement and home decorating magazines, has seen a 20% reduction in operating income over the past nine months, primaril..
|
Describe the difference between classes and objects
: Please describe the difference between classes and objects. How are they related? What does it mean to instantiate an object? Also, please describe the difference between composition and aggregation and when it is better to use one over the other?
|
Prompts the user for a hexadecimal digit
: Write a MIPS program that prompts the user for a hexadecimal digit and then displays the decimal equivalent multiplied by 2. For example, the program displays 10 for hex '5', 20 for 'A', etc. If the user enters an invalid value, the program should di..
|
A program that will prompt the user for a date and a time
: 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:
|
Sample the dribbling to extract its frequency
: Consider a basketball being dribbled. If the height of the basketball can be described by a sine wave of maximum height 2h, average height h and minimum height 0, and the ball hits the ground once per second, how fast would a video camera have to sam..
|
What are your thoughts about your results
: What are your thoughts about your results? What are you feelings towards this assignment? How would you improve it? Submit this with your assignment.
|
Know how to process command line arguments
: Through this programming assignment, the students will learn to do the following: Know how to process command line arguments. Perform basic file I/O.
|
Theater seating revenue with input validation
: Theater Seating Revenue with Input Validation: A dramatic theater has three seating sections, and it charges the following prices for tickets in each section: Section A seats cost $20 each
|