Create a new Java file Valentine.java.

Create a new Java file Valentine.java.
Write a program that uses a while loop to print the numbers from 1 to 150, with each number printed on its own line.
For multiples of 3, print “Roses are red.” instead of the number.
For the multiples of 5, print “Violets are blue.” instead of the number.
For numbers which are multiples of both 3 and 5, print “Sugar is sweet, and so are you!”.
You must use a while loop for full credit.
Hint: Test for numbers that are multiples of both 3 and 5 first.
2.

The New Hampshire Primary is taking place this Tuesday, February 11, 2020.
According to Wikipedia, a primary “Primary elections or often just primaries, are the process by which voters can indicate their preference for their party’s candidate, or a candidate in general, in an upcoming general election… with the goal of narrowing the field of candidates”
The New Hampshire primary is the first of the primary elections, which will be held to select the Democratic nominee for the 2020 presidential race.
Note that the Republican nominee has essentially already been determined
Although New Hampshire is just a small state, its primary receives massive media coverage, and, therefore, has a greater influence over the Democratic race than is small size would suggest.
In this assignment we will develop a program to count votes for the 2020 New Hampshire Primary.
The user enters votes based on a simple menu that presents the candidates.
The user then inputs a single character (upper or lowercase A-C) to choose their candidate from the menu.
Entering an ‘X’ (without the quotes) will exit the tallying operation and present a summary of the votes.
Write your code inside the file Primary.java.
Present a list of candidates to the user and allow her to enter a single character as input, and no other input, as shown in the Example Output.
Use an indefinite while loop to allow multiple votes to be cast on your voting machine.
After all the votes are entered and the user enters an ‘X’, exit the loop and report the vote count by candidate names and neatly aligned as shown in the Example Run.
Your program should also report an error message if the user enters a letter other than A-C or X, as shown below.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Benefits of our college essay writing service

  • 80+ disciplines

    Buy an essay in any subject you find difficult—we’ll have a specialist in it ready

  • 4-hour deadlines

    Ask for help with your most urgent short tasks—we can complete them in 4 hours!

  • Free revision

    Get your paper revised for free if it doesn’t meet your instructions.

  • 24/7 support

    Contact us anytime if you need help with your essay

  • Custom formatting

    APA, MLA, Chicago—we can use any formatting style you need.

  • Plagiarism check

    Get a paper that’s fully original and checked for plagiarism

What the numbers say?

  • 527
    writers active
  • 9.5 out of 10
    current average quality score
  • 98.40%
    of orders delivered on time
error: