Java format using netbeans ide

Assignment Help JAVA Programming
Reference no: EM131565490

Question:Having issues with the following questions and getting it to work in a java format using NetBeans IDE

Question 1A. a class that will hold the information about a clock, called Clock. You need to keep minutes, hours and seconds in military time (24-hour) format. Include member functions that will setTime ( this will set the hours, minutes and seconds of the clock), getHours (return the hours), getMinutes (return the minutes) and getSeconds (return the seconds). Another method printTime which will print the time out like this 03:13:09 (hours:minutes:seconds). Overloaded constructors that will take in hours, minutes and seconds or the default constructor that will take in nothing and set hours, minutes and seconds all to 0.
Your class should also include the following methods

incrementSeconds() //A method to increment the time by one second. //The time is incremented by one second. // If the before-increment time is // 23:59:59, the time is reset to 00:00:00.
incrementMinutes() //A method to increment the time by one minute. // The time is incremented by one minute. // If the before-increment time is // 23:59:53, the time is reset to 00:00:53.
incrementHours() //A method to increment the time by one hour. // The time is incremented by one hour. // If the before-increment time is // 23:45:53, the time is reset to 00:45:53.

Question 1B. Show possible calls to do the following
- a clock that is set to 9:0:0
- another clock that is set to 9:30:20
- Add one hour to the first clock
- Add 30 minutes to the second clock

Question 2A. Using your clock class, a child class, ClockChild. a constructor that calls the parent's default constructor and an overloaded constructor that takes in hours, minutes and seconds and sets the member variables accordingly. a printTime method, for the child. Now it will take in a parameter called typeOfClock. This will be an integer that will be either 12 or 24. This tell the function how to print the time, either in military time (the parents type, call the parent method) or in normal type (12-hour) 11:30pm or 9:09am.

Question 2B. Show calls to instantiate two objects. One of the parent type, with the time set to 23:30:30 and one of the child type with the same time set. Show a call to printTime, using both objects

Reference no: EM131565490

Questions Cloud

What does matthew report about the law in the sermon : What does Matthew report about the law in the Sermon on the Mount. What does Paul say about the law
Find at least three information sources related to the topic : Find at least three information sources related to the topic. You can find assistance with searching for articles at the UMUC Library Subject Guides.
What has happened in galatia to provoke paul : Who is he addressing. What has happened in Galatia to provoke Paul in such a way
Explain benefits to small business of sharing marketing plan : BSBSMB403A Market The Small Business Assessment Tasks. Explain the benefits to a small business of sharing their marketing plan
Java format using netbeans ide : Having issues with the questions and getting it to work in a java format using NetBeans IDE - constructor that calls the parent's default constructor
Describe real world example about how acid rain affect plant : Research and briefly describe a real world example about how acid rain affects plants. Be sure to demonstrate how pH contributes to the outcome.
Explain the four main objections to globalization : In a well-composed essay, explain the four main objections to globalization
Impact of each revolution on the cold war : impact of each revolution on the Cold War, impact of each revolution on another country or countries
Describe the role of the rn in the implementation : Describe how the implementation of a fall prevention program on the OB unit would help to improve patient outcomes.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd