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

  Robot preparing for competition

Create an event so that the skateboard can be controlled by game player

  Bilinear and nearest neighbour algorithm in java

How to do bilinear and nearest neighbour algorithm in java. Show how to eliminate change in pixel aspect ratio in java.

  Design and implement an applet called circles

Design and implement an applet called Circles that draws 50 circles of random diameter in random locations. If the diameter of a circle is less than a certain value, the circle is ?lled with the color yellow.

  Create javascript program to find gross pay for employees

Create JavaScript program which will find out the gross pay for each of three employees. Company pays "straight time" for first 40 hours worked by each employee and pays "time and a half".

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  Technical community blog

Write a blog article for a coding and technical community blog.

  Design an application for pizza order process

Create an application to take and procedure a pizza order. The user should be able to make pizza order choices from listboxes, and the application should show the order price.

  Create web application uses visual web java server

Create the Web application which uses Visual Web Java Server Faces framework and either Apache Tomcat or Glassfish as the server.

  Minimal spanning tree decreasing edge dismissal

Minimal Spanning Tree Decreasing Edge Dismissal, Reverse-delete algorithm. Develop an implementation that computes the MST

  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.

  Describe the steps to program development

What is the function of parseFloat and parseInt and what will be result if we send "abcd" through a prompt() input and pass it through parseInt()?

  It should have an if statement

The following are hints given: It should have an if statement. This add method determines what number greater than or less than the other number, than it adds the positive or negative. I think this should be a private method.

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