Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[C#] I need to write client program using MyDate class [Code at the bottom but it's not the entire thing, so I will upload it

[C#] I need to write client program using MyDate class [Code at the bottom but it's not the entire thing, so I will upload it in parts in the comment if you want. I'll reply once you ask in the comments.]

image text in transcribed

namespace A3_Date { class Birthday { static void Main(string[] args) { MyDate today; int todayMonth; int todayDay; MyDate bday; int bdayMonth; int bdayDay; Console.WriteLine("What is today's month?"); Console.WriteLine("What is today's day?"); // REMEMBER TO TEST OUT YOUR CODE WITH _BOTH_ THE INSTRUCTOR'S // VERSION _AND_ YOUR VERSION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // (there are more details at the top of this file) TestMyDate(); // this jumps down to the 'TestMyDate' method, below: }

The first part of this assignment asks you to write a client program that uses an existing MyDate class written by the instructor. The goal of Part A is to give you a bit of practice creating and using MyDate objects from a client's perspective and to give you an appreciation for the usefulness MyDate objects in general. Begin by prompting the user for today's date and for his/her birthday, first by month and then by day. Use this information to print the number of days in the month the user was born, and the number of days from today to the user's birthday. If the user's birthday is today, print a Happy Birthday message. Below are several example logs of execution from the program; user input is bold and underlined. Your program's output should match these examples exactly given the same input What is today' s month? What is today's day? What is your birthday month? What is your birthday day? There are 30 days in month #9 What is today's month? 12 What is today s day? 15 What is your birthday month? 12 What is your birthday day? 15 There are 31 days in month #12 Happy Birthday! What is today's month? 10 What is today s day? 2 What is your birthday month? Number of days until birthday 9/9: 309 What is today' s month? What is today's day? 19 What is your birthday month? What is your birthday day? 30 There are 30 days in month #11 What is your birthday day? There are 31 days in month #10 Number of days until birthday 11/30 Number of days until birthday 10/1: 364 103 The first part of this assignment asks you to write a client program that uses an existing MyDate class written by the instructor. The goal of Part A is to give you a bit of practice creating and using MyDate objects from a client's perspective and to give you an appreciation for the usefulness MyDate objects in general. Begin by prompting the user for today's date and for his/her birthday, first by month and then by day. Use this information to print the number of days in the month the user was born, and the number of days from today to the user's birthday. If the user's birthday is today, print a Happy Birthday message. Below are several example logs of execution from the program; user input is bold and underlined. Your program's output should match these examples exactly given the same input What is today' s month? What is today's day? What is your birthday month? What is your birthday day? There are 30 days in month #9 What is today's month? 12 What is today s day? 15 What is your birthday month? 12 What is your birthday day? 15 There are 31 days in month #12 Happy Birthday! What is today's month? 10 What is today s day? 2 What is your birthday month? Number of days until birthday 9/9: 309 What is today' s month? What is today's day? 19 What is your birthday month? What is your birthday day? 30 There are 30 days in month #11 What is your birthday day? There are 31 days in month #10 Number of days until birthday 11/30 Number of days until birthday 10/1: 364 103

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

=+11.3. Show that Theorem 11.4(ii) can fail if u(B) =00.

Answered: 1 week ago

Question

Excel caculation on cascade mental health clinic

Answered: 1 week ago