Modify the scholarship application

Assignment Help JAVA Programming
Reference no: EM13160396

The Williamsburg Women's Club offers scholarships to local high school students who meet any of several criteria. Write an application that prompts the user for a student's numeric high school grade point average (for example, 3.2), the student's number of extracurricular activities, and the student's number of service activities. Display the message "Scholarship candidate" if the student has any of the following:

- A grade point average of 3.8 or above at least one extracurricular activity and one service activity.

- A grade point average below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities.

- A grade point average below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities.

- If the student does not meet any of the qualification criteria, display "Not a candidate."

B. Modify the Scholarship application so that if a user enters a grade point average under 0 or over 4.0, or a negative value for either of the activities, an error message appears.

The first part is below. I need help with part B. Thanks!

import java.util.Scanner;
public class Scholarship2
{
   public static void main(String[] args)
   {
      Scanner sin = new Scanner(System.in);
      float averageGrade = 0;
      int extraActivities = 0;
      int extraService = 0;
      System.out.println("Enter high school grade point average: ");
      averageGrade=sin.nextFloat();
     System.out.println("Enter number of extracurricular activities: ");
      extraActivities=sin.nextInt();
      System.out.println("Enter number of service activities: ");
      extraService=sin.nextInt();
       if (averageGrade >= 3.8 && extraActivities >= 1 && extraService >= 1)
         {
            System.out.println("Scholarship Candidate");
         }
            if (averageGrade >= 3.4 && extraActivities >= 3 && extraService >= 3)
            {
               System.out.println("Scholarship Candidate");
            }
            else
            {
               System.out.println("Not a Scholarship Candidate");
            }
               if (!(averageGrade >= 0 || !(averageGrade <= 4.0)) || (!(extraActivities <= 1 || !(extraService >= 3))))
               {
                  System.out.println("Invalid Entry");

Reference no: EM13160396

Questions Cloud

What is the stock-s expected value one year from now : Assume that ABC is a constant growth company whose last paid dividend (D0) was RM2.00 and whose dividend is expected to grow indefinitely at a 6% rate. What is the stock's expected value 1 year from now?
Explain these effects assuming other things were equal : Discuss how changes in household disposable income, housing and stock wealth, and debt-generated movements along and shifts in the U.S. saving function. Explain these effects, assuming other things were equal.
Implement circular linked list in c program : implement circular linked list in c program in the best possible easiest way.
What volume does the gas occupy at this height : A balloon filled with helium gas has a volume of 620 mL at a pressure of 1 atm. The balloon is released and reaches an altitude of 6.5 km, where the pressure is 0.5 atm. Assuming that the temperature has remained the same, what volume does the gas..
Modify the scholarship application : Modify the Scholarship application so that if a user enters a grade point average under 0 or over 4.0, or a negative value for either of the activities, an error message appears.
Ending finished-goods inventory cost under variable costing : What is the ending finished-goods inventory cost under absorption costing? What is the ending finished-goods inventory cost under variable costing?
Amount of cash account problem : In addition to the accounts listed above, Truex also had a Cash account. What is the amount of that Cash account as of May 1?
Thermodynamic system with three states in the canonical : A similar question was asked before, but the formatting of the answer made it unreadable. So, I am asking it again. I have a thermodynamic system with three states in the canonical ensemble
What is the effective rate of protection on the product : If Inputs A and B are respectively 20% and 40% of the cost of producing this product, what is the effective rate of protection on the product?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write java program to read present basic hourly wage

Write down a java program which will input 1. Read present basic hourly wage. Read in workers fist name and socond name.

  Identify the 5 code elements

Identify the 5 code elements for a Password class. Things like: class, instance, and final variables, accessor and mutator method, public and private specifiers for methods and member variables.i need to provide detail and descriptions for each code ..

  File integrity checker - tripwire

Write a program that will perform some of the basic tasks accomplished by a file integrity checker such as Tripwire.

  Write java program to accept two words as input

Write a Java program that accepts two words as input and determines if one of them is resulting from changing the order of the others' letters.

  Write the method called print triangle type.

Write the method called printTriangleType. This method accepts three integer arguments representing the lengths of the sides of a triangle and prints the type of triangle that these sides form. Here are some sample calls to printTriangleType

  Java program to store temperatures in two-dimensional array

Write the Java program which uses two-dimensional array to store highest and lowest temperatures for each month of the year. Program must output average high,average low,

  The game of pig

Write a program that allows a single player to practice the game (that is, there will be no opponent, just a single player). Play 5 turns in the game to get a total score for the player. Refer to the sample output below for a detailed example.

  Implement bounded partial queue by using signaling mechanism

Implement the same using a signaling mechanism that signals to all waiting dequeuers and do a performance comparison using timing analysis. Which works faster?

  Java program use breadth-first search closest broadcast

Write the java program which will use breadth-first search (which you implement as part of your program) to determine the closest broadcast vertex for each vertex in graph.

  Eclipse or netbeans environments

As recommendation, you can try to use Eclipse or NetBeans environments that are used also for other courses as: Introduction in Java programming and Intermediate programming.

  Create the working applet to compute tax

Write down a java applet. Your applet assits to find out how much federal tax we require to pay suppose the tax rate is 12%. Create and implement the working applet to compute tax.

  Write ijvm program to multiply two hexadecimal numbers

Write the IJVM program that multiplies two (hexadecimal) numbers. The user inputs the hex numbers and the result is printed out. The program then accepts another pair of numbers.

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