Reference no: EM13329256
Program 1
Starting with the program below, you are going to fill in the student class so that it can be reused in a GUI later.Complete, this and then create a Frame, that adds a Panel which should contain three text fields, a button and a label.
Use this class so that you can input the student's name, their grades and then display the average in the student's information in a label (include the name and their average).
https://pastebin.com/GAyyAMDd
Program 2
In this exercise, you will write a class that models a Girl Scout cookie seller and use your class to update sales of cookies in a GUI program.
1.Write the GirlScout class assuming a girl scout object is described by two pieces of instance data:name of girl scout(a String) andboxesSold(an integer that represents the number of boxes of cookies the girl scout has sold in the fundraiser).
The class should have the following methods:
·A constructor that has one parameter-a String containing the name of the girl scout. The constructor should set boxesSold to 0.
·A methodgetNamethat returns the name of the girl scout (it has no parameters).
·A method that updates the number of boxes sold called updateBoxesSold that takes in single parameter, representing the number of additional boxes of cookies sold.
·A method update Sales that takes no parameters and just multiplies the boxesSold by 3.50.
·A to String method that returns a string containing the name of the girl scout and the number of boxes of cookies sold in a format similar to the following:
Margie: 16 boxes
2. Write a program that uses GirlScout objects to track the sales of 2 Girl Scouts. Your program should do the following:
·Read in the names of the two girl scouts and construct an object for each (use two different text fields).
·Prompt for and read in the number of boxes sold by each girl scout (use two more text fields).
For each girl scout, after reading in the sales, invoke the update Boxes Sold and update Sales method to update the total sales by that girl scout.
After reading the data and performing your calculations, you should print a two different labels that print the name and total sales for each girl scout (you will implicitly use the toString() method here).