Questions
Task #3 Experimenting with an array of random integers (Week 2) Make sure that the following...

Task #3 Experimenting with an array of random integers (Week 2)
Make sure that the following 3 experiments are done repeatedly by generating a new set of integers to fill the array. For this iterate 10 times and observe results for consistency.
• Make the array size reasonably large (say a thousand) and an even number.
• Choose the version of nextInt() that allows you to set a cap on the random integers generated (set it to a few thousands, but way less than the maximum integer).
• Do the following experiments:
o Count how many integers in the array are odd and even. Are the odd and even counts almost equal?
o Find the minimum, maximum, and average of the integers in the array. Keep track of the minimum and maximum of the three quantities across runs.
o Sort the array by writing an inner and an outer loop. Count the number of times you needed to swap integers.

In: Computer Science

Using Java Write only “stubs” for methods in the Figure, Rectangle, and Triangle classes: Consider a...

Using Java

Write only “stubs” for methods in the Figure, Rectangle, and Triangle classes:

Consider a graphics system that has classes for various figures — say, rectangles, boxes, triangles, circles, and so on. For example, a rectangle might have data members’ height, width, and either a center point or upper-left corner point, while a box and circle might have only a center point (or upper-right corner point) and an edge length or radius, respectively. In a well-designed system, these would be derived from a common class, Figure. In this homework assignment, you will implement such a system.

The class Figure is an abstract base class. In this class, create abstract methods for draw, erase, center, equals, and toString.

Add Rectangle and Triangle classes derived from Figure. Each class has stubs for methods erase, draw, and center. In these "stubs", the method simply prints a message telling the name of the class and which method has been called in that class. Because these are just stubs, they do nothing more than output this message. The method center calls the erase and draw methods to erase the object at its current location and redraw the figure at the center of the picture being displayed. Because you have only stubs for erase and draw, center will not do any real “centering” but simply will call the methods erase and draw, which will allow you to see which versions of draw and center it calls. Add an output message in the method center that announces that center is being called. The methods should take no arguments.

Define a demonstration program for your classes which contains main. Test your programs:

  • creating at least two Rectangle objects and two Triangle objects.
    • All instantiated classes have an equals and toString methods because these are abstract in the Figure class.
    • In this part of the homework, equals can simply return true, and toString can returns a String announcing that toString has been invoked.
  • "draw" all of the objects you just created
  • "center" at least one Rectangle and one Triangle object

In main, make sure that you tell the user what's going on at each step.

Your output should consist primarily of messages from your stub methods. An example of the output from your program might be the following (note: output from main method is shown below in italics):

  ** Create 2 triangles **
  Entering Figure Constructor for triangle 0
  Running Triangle constructor for triangle 0
  Entering Figure Constructor for triangle 1
  Running Triangle constructor for triangle 1

  ** Create 2 rectangles **
  Entering Figure Constructor for rectangle 0
  Running Rectangle constructor for rectangle 0
  Entering Figure Constructor for rectangle 1
  Running Rectangle constructor for rectangle 1

  ** Draw both triangles **
  Entering draw() method for Triangle 0
  Entering draw() method for Triangle 1

  ** Draw both rectangles **
  Entering draw() method for Rectangle 0
  Entering draw() method for Rectangle 1

  ** Center one triangle **
  Entering center() method for Triangle 0
  center() calling erase()
  Entering erase() method for Triangle 0>
  center() calling setCenter() to reset center.  
  Entering Figure's setCenter() for figure 0
  center() calling draw()
  Entering draw() method for Triangle 0

  ** Center one rectangle **
  Entering center() method for Rectangle 1
  center() calling erase()
  Entering erase() method for Rectangle 1
  center() calling setCenter()
  Entering Figure's setCenter() for figure 1
  center() calling draw()
  Entering draw() method for Rectangle 1

In: Computer Science

you are required to use only the functional features of Scheme; functions with an exclamation point...

you are required to use only the functional features of Scheme; functions with an exclamation point in their names (e.g., set!) and input/output mechanisms other than load and the regular read-eval-print loop are not allowed. (You may find imperative features useful for debugging. That’s ok, but get them out of your code before you hand anything in.)

Write a function minMax that, given a list of integers, returns a tuple containing the smallest and largest element in the list. Just return (0 0) for the empty list. > (minMax (5 4 3 2 1)) (1 5)

using the programming language scheme

In: Computer Science

Assume the following JavaScript program was interpreted using static-scoping rules. What value of x is displayed...

Assume the following JavaScript program was interpreted using static-scoping rules. What value of x is displayed in function sub1? Under dynamic-scoping rules, what value of x is displayed in function sub1?

var x;
function  sub1() {
  document.write("x = " + x + "");
}
function  sub2() {
   var x;
   x = 10;
   sub1();
}
x = 5;
sub2();

In: Computer Science

Read and understand the pseudocode of problem R2.19 in java from the end of chapter 2...

  1. Read and understand the pseudocode of problem R2.19 in java from the end of chapter 2 in your textbook. In a Java class named WeekDays, write a java program that reads an input int between (0-6), and displays the corresponding day for that given input as below:

Enter a number (0-6): 2

** 2 is Tue **

!!! NO if-else conditions

In: Computer Science

Modify the mortgage program to display 3 mortgage loans: 7 years at 5.35%, 15 year at...

Modify the mortgage program to display 3 mortgage loans: 7 years at 5.35%, 15 year at 5.5%, and 30 years at 5.75%. Use an array for the different loans. Display the mortgage payment amount for each loan. Do no use graphical user interface. Insert comments in the program to document the program.

***********Please look at my code so far. Still having trouble with arrays. Want to know if I'm going the right path********

import java.util.Scanner;
public class MortPay2
{
public static void main(String args[])
{
//declaration section
double principal, monthlyPayment;
int choice;
Scanner input = new Scanner(System.in);

   int term [] = {84, 180, 360}; //term in months
   double rate [] = {.0044, .0046, .0048};//rate in decimal format

  
   //display section
   System.out.println("Please select from 3 loan options.");
   System.out.println("1. Loan 1: 7 year term at 5.35% interest.");
   System.out.println("2. Loan 2: 15 year term at 5.5% interest.");
   System.out.println("3. Loan 3: 30 year term at 5.75% interest.");
   choice = input.nextInt();

   if (choice ==1)
   {
       System.out.println("You have chosen Loan 1.");
       System.out.println("Please enter the loan amount: $");
       principal = input.nextDouble();

       for ( int i = 0; i<3; i++)
       {
           monthlyPayment = principal * rate[0] / (1.0 - Math.pow (rate[0] + 1), -term[0]));
           System.out.println("Total monthly mortgae payment is $%.2f%n", monthlyPayment);
}
   }
  
  
}
}
  
      
  

In: Computer Science

Problem: Implement a class named StringParser, along with specified methods, that can read words from a...

Problem: Implement a class named StringParser, along with specified methods, that can read words from a text file, parse those words (such as finding palindromes), and write those words to a new file More specifically: 1. Write the StringParser class so that it has the following methods: a) public static void main(String[] args) -- The main driver of the program. Prompts the user for an input file, an output file, and a choice for what kinds of words to output. b) public static void rawOutput(File in, File out)-- Parses an input file, writing each word from the input on a separate line in the output file. c) public static void palindromeOutput(File in,File out) -- Parses an input file, writing only the palindromes to the output file, in alphabetical order, one line at a time, without repetition. Palindromes are words that read the same forward and backward, ignoring digits and punctuation. d) public static void hundredDollarWordOutput(File in, File out) -- Parses an input file, writing only the $100 words to the output file, in alphabetical order, one line at a time, in uppercase, without repetition. $100 words are found by assigning $1 to A, $2 to B, and so on. For example ELEPHANTS is a $100 word because: E + L + E + P + H + A + N + T + S is 5 + 12 + 5 + 16 + 8 + 1 + 14 + 20 + 19 = 100 e) public static boolean isPalindrome(String word) -- Determines if a word is a palindrome (reads the same forward and backward). The method is case-sensitive, so it will say that dad and DAD and d-a-d are palindromes, but Dad and d-ad are not palindromes. f) public static String cleanup(String word)-- Takes a string and removes all non-letters, returning an all uppercase version. For example, this input: "A man, a plan, a canal. Panama." will produce this output: "AMANAPLANACANALPANAMA" g) public static int wordValue(String word)-- Returns the monetary value of a word, found by assigning the value $1 to A, $2 B, and so on, up to $26 for Z. The method will ignore differences in case, so both A and a are each worth $1. It will also ignore any non-letters in the input. 2. Create your own input test file, and use it with your code to generate three output files. 3. Upload all five files (Java source code, input file, three output files).

In: Computer Science

Describe the characteristics of situations when generators are a good solution? python

Describe the characteristics of situations when generators are a good solution? python

In: Computer Science

PLEASE DO IN JAVA AND USING REPL.IT Below are the two files, boysNames.txt and GirlsNames.txt Write...

PLEASE DO IN JAVA AND USING REPL.IT

Below are the two files, boysNames.txt and GirlsNames.txt

Write a program that reads the contents of the two files into two separate arrays, or ArrayLists. The user should be able to enter a boy’s name, a girl’s name, or both, and the application will display messages indicating whether the names were among the most popular.

BoyNames:

Jacob
Michael
Joshua
Matthew
Daniel
Christopher
Andrew
Ethan
Joseph
William
Anthony
David
Alexander
Nicholas
Ryan
Tyler
James
John
Jonathan
Noah
Brandon
Christian
Dylan
Samuel
Benjamin
Zachary
Nathan
Logan
Justin
Gabriel
Jose
Austin
Kevin
Elijah
Caleb
Robert
Thomas
Jordan
Cameron
Jack
Hunter
Jackson
Angel
Isaiah
Evan
Isaac
Mason
Luke
Jason
Gavin
Jayden
Aaron
Connor
Aiden
Aidan
Kyle
Juan
Charles
Luis
Adam
Lucas
Brian
Eric
Adrian
Nathaniel
Sean
Alex
Carlos
Bryan
Ian
Owen
Jesus
Landon
Julian
Chase
Cole
Diego
Jeremiah
Steven
Sebastian
Xavier
Timothy
Carter
Wyatt
Brayden
Blake
Hayden
Devin
Cody
Richard
Seth
Dominic
Jaden
Antonio
Miguel
Liam
Patrick
Carson
Jesse
Tristan
Alejandro
Henry
Victor
Trevor
Bryce
Jake
Riley
Colin
Jared
Jeremy
Mark
Caden
Garrett
Parker
Marcus
Vincent
Kaleb
Kaden
Brady
Colton
Kenneth
Joel
Oscar
Josiah
Jorge
Cooper
Ashton
Tanner
Eduardo
Paul
Edward
Ivan
Preston
Maxwell
Alan
Levi
Stephen
Grant
Nicolas
Omar
Dakota
Alexis
George
Collin
Eli
Spencer
Gage
Max
Cristian
Ricardo
Derek
Micah
Brody
Francisco
Nolan
Ayden
Dalton
Shane
Peter
Damian
Jeffrey
Brendan
Travis
Fernando
Peyton
Conner
Andres
Javier
Giovanni
Shawn
Braden
Jonah
Cesar
Bradley
Emmanuel
Manuel
Edgar
Erik
Mario
Edwin
Johnathan
Devon
Erick
Wesley
Oliver
Trenton
Hector
Malachi
Jalen
Raymond
Gregory
Abraham
Elias
Leonardo
Sergio
Donovan
Colby
Marco
Bryson
Martin

GirlsNames:

Emily
Madison
Emma
Olivia
Hannah
Abigail
Isabella
Samantha
Elizabeth
Ashley
Alexis
Sarah
Sophia
Alyssa
Grace
Ava
Taylor
Brianna
Lauren
Chloe
Natalie
Kayla
Jessica
Anna
Victoria
Mia
Hailey
Sydney
Jasmine
Julia
Morgan
Destiny
Rachel
Ella
Kaitlyn
Megan
Katherine
Savannah
Jennifer
Alexandra
Allison
Haley
Maria
Kaylee
Lily
Makayla
Brooke
Mackenzie
Nicole
Addison
Stephanie
Lillian
Andrea
Zoe
Faith
Kimberly
Madeline
Alexa
Katelyn
Gabriella
Gabrielle
Trinity
Amanda
Kylie
Mary
Paige
Riley
Jenna
Leah
Sara
Rebecca
Michelle
Sofia
Vanessa
Jordan
Angelina
Caroline
Avery
Audrey
Evelyn
Maya
Claire
Autumn
Jocelyn
Ariana
Nevaeh
Arianna
Jada
Bailey
Brooklyn
Aaliyah
Amber
Isabel
Danielle
Mariah
Melanie
Sierra
Erin
Molly
Amelia
Isabelle
Madelyn
Melissa
Jacqueline
Marissa
Shelby
Angela
Leslie
Katie
Jade
Catherine
Diana
Aubrey
Mya
Amy
Briana
Sophie
Gabriela
Breanna
Gianna
Kennedy
Gracie
Peyton
Adriana
Christina
Courtney
Daniela
Kathryn
Lydia
Valeria
Layla
Alexandria
Natalia
Angel
Laura
Charlotte
Margaret
Cheyenne
Mikayla
Miranda
Naomi
Kelsey
Payton
Ana
Alicia
Jillian
Daisy
Mckenzie
Ashlyn
Caitlin
Sabrina
Summer
Ruby
Rylee
Valerie
Skylar
Lindsey
Kelly
Genesis
Zoey
Eva
Sadie
Alexia
Cassidy
Kylee
Kendall
Jordyn
Kate
Jayla
Karen
Tiffany
Cassandra
Juliana
Reagan
Caitlyn
Giselle
Serenity
Alondra
Lucy
Kiara
Bianca
Crystal
Erica
Angelica
Hope
Chelsea
Alana
Liliana
Brittany
Camila
Makenzie
Veronica
Lilly
Abby
Jazmin
Adrianna
Karina
Delaney
Ellie
Jasmin

In: Computer Science

Create a program that allows a user to input customer records (ID number, first name, last...

Create a program that allows a user to input customer records (ID number, first name, last name, and balance owed) and save each record to a file. When you run the main program, be sure to enter multiple records.

Once you create the file, open it and display the results to the user

Save the file as  CustomerList.java

In: Computer Science

Everyone, since we covered that the intent of the BIA is to clearly document how each...

Everyone, since we covered that the intent of the BIA is to clearly document how each business unit depends upon technology, how does the BIA practically get completed? Is there anyone else other than IT involved?

In: Computer Science

● Write a program that reads words from a text file and displays all the words...

● Write a program that reads words from a text file and displays all the words (duplicates allowed) in ascending alphabetical order. The words must start with a letter. Must use ArrayList.

THE TEXT FILE CONTAINS THESE WORDS IN THIS FORMAT:

drunk
topography
microwave
accession
impressionist
cascade
payout
schooner
relationship
reprint
drunk
impressionist
schooner

THE WORDS MUST BE PRINTED ON THE ECLIPSE CONSOLE BUT PRINTED OUT ON A TEXT FILE IN ALPHABETICAL ASCENDING ORDER IS PREFERRED

THANK YOU IN ADVANCE

import java.util.ArrayList;
import java.util.Arrays;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.Collections;
import java.util.List;

public class ArrayListAscending {

   public static void main(String[] args) {
      
       try {
           File j = new File("C:\\Users\\NaharaY\\Dropbox\\Jesse -23263\\Introduction to Software Engineering\\Task 20\\words.txt");
           Scanner input = new Scanner(j);
           List<String>list = new ArrayList<String>();
           String line = "";
           while(input.hasNext()) {
               list.addAll(Arrays.asList(line.split(" ")));
           }
           Collections.sort(list);
           for(String temp:list) {
               if(temp!=null &!temp.equals(""))
                   if(Character.isLetter(temp.charAt(0)))
                       System.out.println(temp);
           }
           input.close();
       }catch(FileNotFoundException e) {
           System.out.println("Error");
       }

   }

}

In: Computer Science

Find global or domestic operating system market share information, that shows the market share of Windows...

Find global or domestic operating system market share information, that shows the market share of Windows 7, 8, and 10. Using that information, answer this question: How successful is Windows 7 compared with other versions of Windows?

In: Computer Science

For this assignment, you will take on the role of software developer as part of a...

For this assignment, you will take on the role of software developer as part of a team of developers for a retail company. The payroll manager of the company has tasked you with developing a Java program (if you can put it in NetBeans that would be awesome) to quickly calculate an employee’s weekly gross and net pay. The program must prompt the user to enter the employee’s name, rate of pay, and hours worked. The output will display the information entered into the program along with the calculations for gross pay, total amount of deductions, and net pay.

In this coding assignment, you will utilize the Java syntax and techniques you learned while reviewing the required resources for Week 1. You may select appropriate variable names as long as proper Java syntax is used. You will also submit your source code.

Input:
In the input section, utilize Java syntax and techniques to input the employee’s name, rate of pay, and hours worked. The input should be completed either via keyboard or via file.

Processing:
In the processing section, the following calculations will need to be performed in the processing section:

  • Gross Pay:
    Gross pay if hours worked are 40 hours or less = hours worked * rate of pay
    Gross pay if hours worked are greater than 40 hours = ((hours worked – 40) * (rate of pay * 1.5)) + (40 * rate of pay)
    • Example – Employee worked 55 hours. The employee’s rate of pay is $10.00.
      ((55 – 40) * (10 * 1.5)) + (40 * 10) = 625
      The gross pay is $625.
  • Deductions:
    Deductions are calculated based upon the following rates:
    • Federal Tax = 15%
    • State Tax = 3.07%
    • Medicare = 1.45%
    • Social Security = 6.2%
    • Unemployment Insurance = .07%

The following calculations are used to calculate each deduction:

  • Federal tax amount = federal tax rate* gross pay
  • State Tax amount = state tax rate * gross pay
  • Medicare amount = Medicare rate * gross pay
  • Social Security amount = social security rate * gross pay
  • Unemployment Insurance amount = unemployment insurance amount * gross pay

Total deductions = Federal Tax amount + State Tax amount + Medicare amount + Social Security amount + Unemployment Insurance amount

  • Net Pay:
    The net pay amount is calculated as follows:
    Net pay = gross pay amount – total deductions

Output:
The Java program should display the following information:

  • Employee Name
  • Rate of Pay
  • Hours Worked
  • Overtime Worked
  • Gross Pay
  • Total amount of deductions
  • Net Pay

In: Computer Science

In this assignment will demonstrate your understanding of the following: 1. C++ classes; 2. Implementing a...

In this assignment will demonstrate your understanding of the following:

1. C++ classes;

2. Implementing a class in C++;

3. Operator overloading with chaining;

4. Preprocessor directives #ifndef, #define, and #endif;

5. this – the pointer to the current object.

In this assignment you will implement the Date class and test its functionality.

Consider the following class declaration for the class date:

class Date

{

public:

Date(); //default constructor; sets m=01, d=01, y =0001

Date(unsigned m, unsigned d, unsigned y);

//explicit-value constructor to set date equal to today's

//date. Use 2-digits for month (m) and day (d), and 4-digits for year (y); this function should //print a message if a leap year.

void display();//output Date object to the screen

int getMonth();//accessor to output the month

int getDay();//accessor to output the day

int getYear();//accessor to output the year

void setMonth(unsigned m);//mutator to change the month

void setDay(unsigned d);//mutator to change the day

void setYear(unsigned y);//mutation to change the year

friend ostream & operator<<(ostream & out, const Date & dateObj);//overloaded operator<< as a friend function with chaining

//you make add other functions if necessary

private:

int myMonth, myDay, myYear; //month, day, and year of a Date obj respectively };

You will implement all the constructors and member functions in the class Date. Please see the comments that follow each function prototype in the Date class declaration above; these comments describe the functionality that the function should provide to the class.

Please store the class declaration in the file “date.h” and the class implementation in the file “date.cpp” , and the driver to test the functionality of your class in the file “date_driver.cpp”.

S A M P L E O U T P U T FORAssignment#2

Below I have provided a skeleton with stubs and a driver to help you get started. Remember to separate the skeleton into the appropriate files, and to include the appropriate libraries.

You should submit the files “date.h” , “date.cpp” , and “date_driver.cpp” together in a zip file named with the format “lastname_firstname_date.zip” to Canvas before the due date and time. Usually the tool you use to create a zip file will automatically append “zip” to the end of the filename.

Notes:

1. ALL PROGRAMS SHOULD BE COMPILED USING MS VISUAL STUDIO C++!

2. Information on Month: 1 = January, 2 = February, 3= March, …, 12 = December

3. Test the functionality of your class in “date_driver.cpp” in the following order and include messages for each test:

a. Test default constructor

b. Test display

c. Test getMonth

d. Test getDay

e. Test getYear

f. Test setMonth

g. Test setDay

h. Test setYear

4. See sample output below.

5. See skeleton below.

S A M P L E O U T P U T FORAssignment#2

Default constructor has been called

01/01/0001

Explicit-value constructor has been called

12/31/1957

Explicit-value constructor has been called

Month = 15 is incorrect

Explicit-value constructor has been called

2/29/1956

This is a leap year

Explicit-value constructor has been called

Day = 30 is incorrect

Explicit-value constructor has been called

Year = 0000 is incorrect

Explicit-value constructor has been called

Month = 80 is incorrect

Day = 40 is incorrect

Year = 0000 is incorrect

12/31/1957

12

31

1957

myDate: 11/12/2015 test2Date: 02/29/1956 yourDate: 12/31/1957

Skeleton FOR Assignment#2

#include <iostream>

#include <iostring>

//#include "date.h"

using namespace std;

//*********************************************************************************************

//*********************************************************************************************

// D A T E . h

//This declaration should go in date.h

#ifndef DATE_H

#define DATE_H

class Date

{

public: Date(); //default constructor; sets m=01, d=01, y =0001 Date(unsigned m, unsigned d, unsigned y);

//explicit-value constructor to set date equal to today's

//date. Use 2-digits for month (m) and day (d), and 4-digits for year (y); this function should

//print a message if a leap year.

void display();//output Date object to the screen

int getMonth();//accessor to output the month

int getDay();//accessor to output the day

int getYear();//accessor to output the year

void setMonth(unsigned m);//mutator to change the month

void setDay(unsigned d);//mutator to change the day

void setYear(unsigned y);//mutation to change the year

friend ostream & operator<<(ostream & out, const Date & dateObj);//overloaded operator<< as a friend function with chaining

//you make add other functions if necessary

private:

int myMonth, myDay, myYear; //month, day, and year of a Date obj respectively };

#endif

//*********************************************************************************************

//*********************************************************************************************

// D A T E . C P P

//This stub (for now) should be implemented in date.cpp

//*************************************************************************************

//Name: Date

//Precondition: The state of the object (private data) has not been initialized

//Postcondition: The state has been initialized to today's date

//Description: This is the default constructor which will be called automatically when

//an object is declared. It will initialize the state of the class

//

//*************************************************************************************

Date::Date()

{

//the code for the default constructor goes here

}

//*************************************************************************************

//Name: Date

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

Date::Date(unsigned m, unsigned d, unsigned y)

{

}

//*************************************************************************************

//Name: Display

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

void Date::display()

{

}

//*************************************************************************************

//Name: getMonth

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

int Date::getMonth()

{

return 1;

}

//*************************************************************************************

//Name: getDay

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

int Date::getDay()

{

return 1;

}

//*************************************************************************************

//Name: getYear

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

int Date::getYear()

{

return 1;

}

//*************************************************************************************

//Name: setMonth

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

void Date::setMonth(unsigned m)

{

}

//*************************************************************************************

//Name: setDay

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

void Date::setDay(unsigned d)

{

}

//*************************************************************************************

//Name: getYear

//Precondition:

//Postcondition:

//Description:

//

//

//*************************************************************************************

void Date::setYear(unsigned y)

{

}

ostream & operator<<(ostream & out, const Date & dateObj)

{

return out;

}

//*********************************************************************************************

//*********************************************************************************************

// D A T E D R I V E R . C P P

//EXAMPLE OF PROGRAM HEADER

int main()

{

//Date myDate;

//Date yourDate(12,31, 1957);

//Date test1Date(15, 1, 1962);

//should generate error message that bad month

//Date test2Date(2, 29, 1956);

//ok, should say leep year

//Date test3Date(2, 30, 1956);

//should generate error message that bad day

//Date test4Date(12,31,0000);

//should generate error message that bad year

//Date test5Date(80,40,0000);

//should generate error message that bad month, day and year

//yourDate.display();

//cout<<yourDate.getMonth()<<endl;

//cout<<yourDate.getDay()<<endl;

//myDate.setMonth(11);

//myDate.setDay(12);

//myDate.setYear(2015);

//cout<<"myDate: "<<myDate<<" test2Date: "<<test2Date<<" yourDate: "<<yourDate<<endl;

return 0;

}

In: Computer Science