Design of Modern Information Systems
September 19, 2019
 Most of computer attacks
September 19, 2019

valid date

Q1) Write a program that reads a string from the keyboard and tests whether it contains a valid date. Display a message explaining why it is not valid.

The input date will have the format mm/dd/yyyy. A valid month value mm must be from 1 to 12 (January is 1). The day value dd must be from 1 to a value that is appropriate for the given month. February has 28 days except for leap years when it has 29. A leap year is any year that is divisible by 4 but not divisible by 100 unless it is also divisible by 400.

Q2) Write a JAVA program to read a list of nonnegative integers and to display the largest integer, the smallest integer and the average of all the integers. The user indicates the end of the input by entering a negative sentinel value that is not used in finding the largest, smallest and average values. The average should be a value of type double so that it is computed with a fractional part

Q3) To make telephone numbers easier to remember, some companies use letters to show their telephone number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN. In some cases, to make a telephone number meaningful, companies must use more than seven letters. For example, 225-5466 can be displayed as CALL HOME, which uses eight letters.

Write a program that prompts the user to enter a telephone number expressed in letters and outputs the corresponding telephone number in digits. If the user enters more than seven letters, then process only the first seven letters. Also output the – (hyphen) after the third digit. Allow the user to use both uppercase and lowercase letters as well as spaces between words.

 

“Is this question part of your assignment? We Can Help!”


valid date was first posted on September 19, 2019 at 6:20 am.
©2019 "Nursing Term Paper". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me at ukbestwriting@gmail.com

 

“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”


valid date was first posted on September 19, 2019 at 6:21 am.
©2019 "nursing Writers". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me at admin@nursingtermpaper.org

 

"Is this question part of your assignment? We Can Help!"

Nursing Coursework