Programming Logic and Design

posted by WayneR

Create a class named Year that contains data fields to hold the number of months in a year and the number of days in a year. Include a constructor that sets the number of months to 12 and the number of days to 365, and get and set methods for each field.

b. Design an application that instantiates one object of each class and displays all the data.

Respond to this Question

First Name

Your Answer

Similar Questions

  1. programming

    Design a class named Book that holds a stock number, author, title, price, and number of pages for a book. Include a method that sets all the data files and another that prints the values for each data field. Create the class diagram …
  2. Programming II

    Create a test program that defines and uses both the default and non-default constructor of a class. Create a class of students in a college. Make sure you include name, phone number, student number, current course, current GPA, and …
  3. programming

    Design a class named Book that holds a stock number, author, title, price, and number of pages for a book. Include methods to set and get the values for each data field. Also include a displayInfo() method that displays each …
  4. pseudocode

    Create a class named Year that contains data fields to hold the number of months in a year and the number of days in a year. Include a constructor that sets the number of months to 12 and the number of days to 365, and get and set …
  5. Programming logic design

    Design a class named DVD that has fields for the DVD category , tittle and price include methods to set and get the value for each field write pseudocode that definnes this class.
  6. Java programming

    I have hard time doing this any help? Rewrite the definition of the method setdate and the constructor with parameters so that the values of month, day, and year are checked before storing the date into the data members. Add a method
  7. math

    The data shows the total number of employee medical leave days taken for​ on-the-job accidents in the first six months of the​ year:19​, 10, 26​, 12​, 28​, 19. Find the mean number of days taken for medical leave each month
  8. Program Design and Development

    Design a class called SimpleCalculator using psudoecode that contains public methods named add(), subtract(). Each of the methods accepts two numeric arguments and returns a number that represents the result of the appropriate arithmetic …
  9. programming

    Design a sub-class of SimpleCalculator called Calculator using psudoecode that contains public methods named multiply(), and divide() and that defines private fields called num1 and num2. Each of the methods accepts two numeric arguments …
  10. programming

    Design a sub-class of SimpleCalculator called Calculator using psudoecode that contains public methods named multiply(), and divide() and that defines private fields called num1 and num2. Each of the methods accepts two numeric arguments …

More Similar Questions