Write a class that models a girl scout cookie seller

Assignment Help Computer Graphics
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).

Reference no: EM13329256

Questions Cloud

What will be the final pressure of the air : An inverted cylindrical tube is immersed in water with 20.0 cm protruding from the surface, what will be the final pressure of the air
Find what rate of return will mr templeton need in order : Franklin Templeton has just invested $9,160 for his son (age one). This money will be used for his son's education 17 years from now. He calculates that he will need $53,882 by the time the boy goes to school.
What is the frictional force acting on the cylinder : In the figure below, a constant horizontal force app of magnitude 11 N is applied to a uniform solid cylinder by fishing line wrapped around the cylinder. what is the frictional force acting on the cylinder
Discuss the conventional model of organisational learning : Discuss the conventional model of organisational learning
Write a class that models a girl scout cookie seller : 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.
Estimate the acceleration of the sled : A runner wearing spiked shoes pulls a 18 kg sled across frictionless ice using a horizontal spring with spring constant 170 N/m. What is the acceleration of the sled
Show the perpetual inventory system : Journalize the transactions for the month of June for Goldenrod Warehouse, using a perpetual inventory system
How international trade has altered the u. s. domestic : Explain how international trade has altered the U. S. domestic manufacturing base. How has it made it more or less competitive?
Explain what wavelength is expected for light composed : What wavelength is expected for light composed of photons produced by an n=3 to n=1 transition in a hydrogen atom

Reviews

Write a Review

Computer Graphics Questions & Answers

  Is lesson age-appropriate

Using the Technology Integration Matrix, or theArizona Technology Integration Matrixchoose two different lessons for the grade level (K-5, 6-8, 9-12) you are becoming certified in.

  Create a set of criteria for assessment of video clips

Create a set of criteria for assessment of video clips suitable for inclusion in Multimedia presentations over the web.

  Design a program that show passing arguments byval and byref

Require to design a program that show passing arguments ByVal and then ByRef. It is suggested that I create a square function process and get an integer from the user then send it ByVal one time.

  Explain the use of web standards

Describe the use of web standards. Why are they important when designing and developing websites? List three examples of these standards and discuss how they are used.

  Develop a grayscale image consisting of grid

Develop a grayscale image consisting of an 8 x 8 grid with vertical line in the first column. Compress into JPEG format and decompress.

  Write program to animate two circles bouncing around window

Write a program to animate two circles bouncing around a window. The basic idea is to start the two circles somewhere in the interior of the window.

  Selecting bit mapped or vector graphics

For each of the provide a detailed rational for selecting bit mapped or vector graphics when they used in a web based application,

  Create menu or appropriate gui for material parameters

Create menu or appropriate GUI for material parameters. Users should be able to manipulate the parameters for material; ambient, diffuse, specular in each RGB channel and shininess.

  How many minutes of uncompressed digital video can be stored

Approximately how many minutes of uncompressed digital video could be stored and played from a standard (single-speed) CD-ROM at 640 X 480 resolution using 256 colors?

  Discuss history of portfolio design in graphics design

Discuss the history of portfolio design in the graphics design industry, and the role of a graphic designer. Discuss current trends in portfolio design, and the possible future technologies for the industry.

  Program that bounces a blue ball inside jpanel

Create a program that bounces a blue ball inside a JPanel. The ball should start moving with a mousePressed event. When the ball hits the edge of the JPanel, it should bounce off the edge and continue in the reverse direction.

  How to choose the particular approach

For each one justify why you would choose the particular approach and what advantages / disadvantages there might be.

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