Write application that prompts user for a month day and year

Assignment Help JAVA Programming
Reference no: EM131232586

Chp 5

a. Write an application that prompts a user for a month, day, and year. Display a message that specifies whether the entered date is

1. not this year,
2. in an earlier month this year,
3. in a later month this year, or
4. this month.

Save the file as PastPresentFuture.java.

b. Use the Web to learn how to use the LocalDate Boolean methods isBefore(), isAfter(), and equals(). Use your knowledge to write a program that prompts a user for a month, day, and year, and then displays a message specifying whether the entered day is in the past, the current date, or in the future. Save the file as PastPresentFuture2.java.

7. Create a class that holds data about a job applicant. Include a name, a phone number, and four Boolean fields that represent whether the applicant is skilled in each of the following areas: word processing, spreadsheets, databases, and graphics. Include a constructor that accepts values for each of the fields. Also include a get method for each field. Create an application that instantiates several job applicant objects and pass each in turn to a Boolean method that determines whether each applicant is qualified for an interview. Then, in the main() method, display an appropriate method for each applicant. A qualified applicant has at least three of the four skills. Save the files as JobApplicant.java and TestJobApplicants.java.

Chp 6

2.

a. Write an application that counts by three from 3 through 300 inclusive, and that starts a new line after every multiple of 30 (30, 60, 90, and so on). Save the file as CountByThrees.java.

b. Modify the CountByThrees application so that the user enters the value to count by. Start each new line after 10 values have been displayed. Save the file as CountByAnything.java.

8. Write an application that allows a user to enter any number of student test scores until the user enters 999. If the score entered is less than 0 or more than 100, display an appropriate message and do not use the score. After all the scores have been entered, display the number of scores entered, the highest score, the lowest score, and the arithmetic average. Save the file as TestScoreStatistics.java.

Chp 7

1. Write an application that prompts the user for three first names and concatenates them in every possible two-name combination so that new parents can easily compare them to find the most pleasing baby name. Save the file as BabyNameComparison.java.

2.

1. Create a program that contains a String that holds your favorite movie quote and display the total number of spaces contained in the String. Save the file as CountMovieSpaces.java.

2. Write an application that counts the total number of spaces contained in a movie quote entered by the user. Save the file as CountMovieSpaces2.java.

Chp 8

1. Write an application that stores 12 integers in an array. Display the integers from first to last, and then display the integers from last to first. Save the file as TwelveInts.java.

2. Allow a user to enter any number of double values up to 20. The user should enter 99999 to quit entering numbers. Display an error message if the user quits without entering any numbers; otherwise, display each entered value and its distance from the average. Save the file as DistanceFromAverage.java.

Chp 9

1. Radio station JAVA wants a class to keep track of recordings it plays. Create a class named Recording that contains fields to hold methods for setting and getting a Recording's title, artist, and playing time in seconds. Save the file as Recording.java.

2. Write an application that instantiates five Recording objects and prompts the user for values for the data fields. Then prompt the user to enter which field the Recordings should be sorted by-song title, artist, or playing time. Perform the requested sort procedure, and display the Recording objects. Save the file as RecordingSort.java.

Chp 10

1. Create a class named Horse that contains data fields for the name, color, and birth year. Include get and set methods for these fields. Next, create a subclass named RaceHorse, which contains an additional field that holds the number of races in which the horse has competed and additional methods to get and set the new field. Write an application that demonstrates using objects of each class. Save the files as Horse.java, RaceHorse.java, and DemoHorses.java.

2. Mick's Wicks makes candles in various sizes. Create a class for the business named Candle that contains data fields for color, height, and price. Create get methods for all three fields. Create set methods for color and height, but not for price. Instead, when height is set, determine the price as $2 per inch. Create a child class named ScentedCandle that contains an additional data field named scent and methods to get and set it. In the child class, override the parent's setHeight() method to set the price of a ScentedCandle object at $3 per inch. Write an application that instantiates an object of each type and displays the details. Save the files as Candle.java, ScentedCandle.java, and DemoCandles.java.

Chp 12

1. Write an application named BadSubscriptCaught in which you declare an array of 10 first names. Write a try block in which you prompt the user for an integer and display the name in the requested position. Create a catch block that catches the potential ArrayIndexOutOfBoundsException thrown when the user enters a number that is out of range. The catch block should also display an error message. Save the file as BadSubscriptCaught.java.

2. The Double.parseDouble() method requires a String argument, but it fails if the String cannot be converted to a floating-point number. Write an application in which you try accepting a double input from a user and catch a NumberFormatException if one is thrown. The catch block forces the number to 0 and displays an appropriate error message. Following the catch block, display the number. Save the file as TryToParseDouble.java.

Chp 13

1. Create a file using any word-processing program or text editor. Write an application that displays the file's name, containing folder, size, and time of last modification. Save the file as FileStatistics.java.

2. Create three files of any type you choose-for example, word-processing documents, spreadsheets, or pictures. Write an application that determines whether the first two files are located in the same folder as the third one. Test the program when the files are in the same folder and when they are not. Save the file as CompareFolders.java.

Chp 14

1. Write an application for Lambert's Vacation Rentals. Use separate ButtonGroups to allow a client to select one of three locations, the number of bedrooms, and whether meals are included in the rental. Assume that the locations are parkside for $600 per week, poolside for $750 per week, or lakeside for $825 per week. Assume that the rentals have one, two, or three bedrooms and that each bedroom over one adds $75 to the base price. Assume that if meals are added, the price is $200 more per rental. Save the file as JVacationRental.java.

2.

1. Write an application that allows a user to select one of at least five television shows to watch on demand. When the user selects a show, display a brief synopsis. Save the file as JTVDownload.java.

2. Change the JTVDownload application to include an editable combo box. Allow the user to type the name of a television show and display an appropriate error message if the desired show is not available. Save the file as JTVDownload2.java.

Chp 15

1. Create a JFrame that holds five buttons with the names of five different fonts. Include a sixth button that the user can click to make a font larger or smaller. Display a demonstration JLabel using the font and size that the user selects. Save the file as JFontSelector.java.

2. Create a JFrame that uses BorderLayout. Place a JButton in the center region. Each time the user clicks the JButton, change the background color in one of the other regions. Save the file as JColorFrame.java.

Chp 16

1. Write an application that extends JPanel and displays a phrase in every font size from 6 through 20. Save the file as JFontSizesPanel.java.

2.

1. Write an application that extends JPanel and displays a phrase in a large font. Each time the user clicks a JButton, display the same phrase in a different color, a little further to the right, and in a slightly smaller font. Allow only three clicks. Save the file as JChangeSizeAndColorPanel.java.

2. Modify the JChangeSizeAndColorPanel application so that it continuously changes the size, color, and location of a phrase as long as the user continues to click the button. Save the application as JChangeSizeAndColorPanel2.java.

3. Write an application that extends JPanel and displays a phrase. Each time the user clicks a button, alternate between displaying the phrase upside down and right-side up. Save the application as JUpsideDownPanel.java.

Reference no: EM131232586

Questions Cloud

Find examples of marketing strategies : Find examples of marketing strategies that are targeted at important cultural values in your society. These could be ads, but other marketing strategies (pricing promotions) could be used too.Ideally, these strategies will be for different brands in ..
Provide pseudocode of your overall design : Provide pseudocode of your overall design that fulfillsthe requirements of theproject. Provide a flowchart for your design. You can use Excel, Word, Powerpoint, Visio or any software you have available that will allow to draw shapes andconnectors.
Least cost-plan for stocking machine : A soft drink company has placed a vending machine that dispenses cans in the basement of a building. The machine holds c cans when full. The machine may be restocked at the beginning of any month at a cost of $r that covers labor and transportation. ..
Discuss why australia is one of the few jurisdictions : BUSN9123 PRINCIPLES OF COMMERCIAL LAW 2016 - Explain how the independence test applies for former auditors and accountants joining company boards? Refer to appropriate statutory provisions as required.
Write application that prompts user for a month day and year : Write an application that prompts a user for a month, day, and year. Display a message that specifies whether the entered date is not this year and in an earlier month this year.
The process of trying to understand message is called : The process of transmitting information from one party to another is called: The process of trying to understand a message is called: This type of management is used to coordinate ideas, materials, and transformation processes. The Japanese process o..
What are the advantages and disadvantages of using rodc : Describe a minimum of two circumstances or situation where the use of RODC would be warranted. What considerations need to be planned for the implementation and placement of a RODC? What are the advantages and disadvantages of using RODC?
Initiating structure is term most closely associated : All of the types of power listed below are position power except: "Initiating structure" is a term most closely associated with what type of leadership? The ability of a group to outperform the sum of its individual members is called:
Evaluate and make important credit risk related decisions : FIN5CRM 2016 Simulate a real world situation and evaluate and make important credit risk related decisions - Apply your knowledge of credit risk to solve real problems faced by banks.

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