Programming Logic and Design

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.

asked by WayneR

Respond to this Question

First Name

Your Response

Similar Questions

  1. 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
  2. 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
  3. Computers

    Create a class named Checkup with fields that hold a patient number, two blood pressure figures (systolic and diastolic), and two cholesterol figures (LDL and HDL). Include methods to get and set each of the fields. Include a
  4. object oriented programming

    Create a project named BankAccountTester. Create a class named BankAccount. A bank account has fields for a balance. The bank account balance should be initialized to 0. The bank account class should include a deposit which adds
  5. Design

    Design a class named StockTransaction that holds a stock symbol (typically one to four characters), stock name, number of shares traded, and price per share. Include methods to set and get the values for each data field. Create
  6. Program Design and Development

    Help on Design a class named StockTransaction that holds a stock symbol (typically one to four characters), stock name, number of shares traded, and price per share. Include methods to set and get the values for each data field.
  7. 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
  8. C#

    The Peterman Publishing Company has decided that no published book should cost more than 10 cents per page. Create a BookException class whose constructor requires three arguments: a string Book title, a double price and an int
  9. MS office Acess 2007

    Determining Table Fields Which should not be included as fields in a table? Choose all that apply. A - Small fields B - Region fields C - Yes/No fields D - Calculated data E - Numbered fields F - Separate name fields
  10. science

    Shown below are the data giving the length of life of lights in an underground tunnel. 9.0 months 7.0 months 8.2 months 8.3 months 7.8 months 8.1 months 7.5 months 7.6 months 9.1 months 7.4 months I calculated the standard

More Similar Questions