Assume that you have an array declared as: double[] scores = new double[50]; and that every compartment of the array contains a real number between 0.0 and 100.0 inclusive.

  • A passing score is 70.0 or higher and a failing score is less than 70.0. Write a code segment to calculate the number of passing scores and the number of failing scores in the array.
  • Write a code segment which calculates and displays the average of the scores in the array

Assume that an arrays has been defined:

int[] par = new int[18];
int[] strokes = new int[18];

Assume that every compartment of the arrays contains an appropriate integer value representing the par value and the number of strokes made by a golfer on each hole of an eighteen hole golf course.

  • Write a code segment that calculates and displays the number of holes upon which the golfer made an eagle. To make an eagle, the number of strokes made by the golfer must be two fewer than the par value for the hole.
  • Write a code segment to display the hole numbers for all holes on which the golfer missed par. To miss par, the number of strokes on the hole must be greater than the par value for the hole.

A ticket to a Waikiki show must store, Show Date and Time (a String), Seat Information (a String), and Price (a double). A VIP ticket to the same show includes dinner and must also store Meal Choice (a String).

Code the class heading, variable declarations and constructors for the “Ticket” and “VIPTicket” objects. “VIPTicket” is a subclass of the “Ticket” class and inherits all of its instance data variables.

Write a code segment which accepts the price of a tour. A tour is priced between 29.95 and 249.99. Your code segment should handle any user input nicely and should continue to repeat until a valid price is entered.

Example:
The user enters: 15.
You ask again
The user enters: bb
You ask again
The user enters: 250
You ask again
The user enters: 75.12
Exit
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.