Question

In Java: Declare and initialize a class-level constant to hold the number of days in September(30)...

In Java:

Declare and initialize a class-level constant to hold the number of days in September(30) using an appropriate data type, a good name, and standard style

0 0
Add a comment Improve this question Transcribed image text
Answer #1

public static final int NUM_DAYS_IN_SEPTEMBER = 30;
Add a comment
Know the answer?
Add Answer to:
In Java: Declare and initialize a class-level constant to hold the number of days in September(30)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In the following program, declare an integer array daysInMonth that stores the number of days in January, February, March, April, and so on

    # JAVA In the following program, declare an integer array daysInMonth that stores the number of days in January, February, March, April, and so on. Fill it with the appropriate values (31, 28, 31, 30, ...).The program reads a month and year from the user.When the year is a leap year, change the entry for February to 29.Print out how many days the given month has.CODE:import java.util.Scanner;public class NumberOfDays{   public static void main(String[] args)   {      // Declare and initialize daysOfMonth      ....

  • for c++ answer the following and create the following (1)Declare a class to hold Employee Data....

    for c++ answer the following and create the following (1)Declare a class to hold Employee Data. It must have at least 2 attributes and 1 method in addition to getters/setters for 1 of the 2 attributes. Also, include at least 2 constructors and a destructor. Put the appropriate members in public and private sections. You don't need to write the code to implement the class except for getters and setters which should include the appropriate inline code. (2) What is/are...

  • I am having problems with my java homework in class. Write a program that will interactively...

    I am having problems with my java homework in class. Write a program that will interactively read the name, age, weight in pounds, and height in inches for five people and output the BMI for each one. At the end of the program, it should output the average age, average height and average weight of the five participants. IT HAS TO INCLUDE: Declare and use a program constant of data type int named CONVERSION_FACTOR to represent the value 703. Use...

  • Anyone helps me in a Java Languageif it it is possible thanks. Write a class called...

    Anyone helps me in a Java Languageif it it is possible thanks. Write a class called Player that holds the following information: Team Name (e.g., Ravens) . Player Name (e.g., Flacco) . Position's Name (e.g. Wide reciver) . Playing hours per week (e.g. 30 hours per week). Payment Rate (e.g., 46 per hour) . Number of Players in the Team (e.g. 80 players) . This information represents the class member variables. Declare all variables of Payer class as private except...

  • Create an Item class, which is the abstract super class of all Items.           Item class...

    Create an Item class, which is the abstract super class of all Items.           Item class includes an attribute, description of type String for every item. [for eg. Book]                                                             A constructor to initialize its data member of Item class.               Override toString() method to return details about the Item class. Create the ExtraCharge interface with the following details.                       Declare a constant RATE with value 0.25   Declare a method called calculateExtraCharge(), which returns a double value. Create the...

  • 3. Arrays Question_code) [16 Marks] Develop a Java application which stores the following number of online...

    3. Arrays Question_code) [16 Marks] Develop a Java application which stores the following number of online flight ticket bookings for each of the last 4 months into an array. Month Number of Flight Ticket Bookings February 6150 March 9085 April 6689 May 8365 Your answer should include the following: a) Give an appropriate name to your array, initialize it with an appropriate datatype and add the number of flight ticket bookings for the last 4 months to the array as...

  • IN C++ Please!! Declare a global integer constant called SIZE and initialize it to 10. •...

    IN C++ Please!! Declare a global integer constant called SIZE and initialize it to 10. • Declare a global enum variable that will support 10 values – each representing an ant colony {A, B, C, D, E, F, G, H, I, J}. • In the main function, o Declare a 2-dimensional array of size the global integer constant, SIZE. The number of rows and columns should be equal to SIZE, which would make this a square matrix. This array will...

  • Create a class called Student. This class will hold the first name, last name, and test...

    Create a class called Student. This class will hold the first name, last name, and test grades for a student. Use separate files to create the class (.h and .cpp) Private Variables Two strings for the first and last name A float pointer to hold the starting address for an array of grades An integer for the number of grades Constructor This is to be a default constructor It takes as input the first and last name, and the number...

  • Implement an abstract class named Person and two subclasses named Student and Staff in Java. A person has a name, address, phone number and e-mail address. A student has a credit hour status (freshman...

    Implement an abstract class named Person and two subclasses named Student and Staff in Java. A person has a name, address, phone number and e-mail address. A student has a credit hour status (freshman, sophomore, junior, or senior). Define the possible status values using an enum. Staff has an office, salaray, and date-hired. Implement the above classes in Java. Provide Constructors for classes to initialize private variables. Getters and setters should only be provided if needed. Override the toString() method...

  • JAVA We will write a psychic game program in which a player guesses a number randomly...

    JAVA We will write a psychic game program in which a player guesses a number randomly generated by a computer. For this project, we need 3 classes, Player, PsychicGame, and Driver. Description for each class is as following: Project Folder Name: LB05 1. Player class a.Input - nickName : nick name of the player - guessedNumber : a number picked for the player will be assigned randomly by a computer later. b. Process - constructor: asks a user player’s nickName...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT