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

  Describe hardware flow control''s advantage over software

Describe hardware flow control's advantages over software flow control in terms of improving modem speed.

  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.

  Differences in database design models

Make a poster or presentation, which graphically depicts differences between database design models.

  Practices for web graphics

Assume your Web design firm has just hired a talented graphic artist with years of expertise in print media and no experience with creating image production.

  Write a memo report to your boss communicating the trends

Enter the spreadsheet data below and then prepare graphs that will help you see trends or patterns. Create at least three different graph types as part of your analysis.  That means a bar, a pie and a line graph, for example.

  Led is blinking a different color than usual

1. Joe has just moved his PC to his new offce. After hooking up all the cables, he turns on the system, and when it asks for his password, the keyboard will not respond. What could possibly be wrong?

  Essential elements of a design pattern

configuration of an Iterator pattern, patterns could be used in a Library System, Singleton, Template, Decorator, Façade,What does Alexander means by the following declaration "But it is impossible to form anything which has the temperament of natu..

  Make a list of eight shots in picture composition

What are the specific instructions that the director gives to the camera operator to perform each operation Make a list of eight shots in picture composition

  Show the matrix and the starting points

you do not need to show matrix math calculations, but you should show the matrix and the starting points and the results for each geometric transformation.

  Flaw in your design and outline

After completing Part a, discuss the flaw in your design and outline some code that will cause it to break (your code should compile fine and will also execute without an error but will violate how a rectangle or square should behave).

  Publishing and marketing plan a website

Without a publishing and marketing plan a website does not help the client to generate business. Your task in this part of the project is to think of a publishing and marketing plan for your website

  Shadow effect while rolling a sphere

Shadow effect while rolling a sphere as well as the options of shading and lighting.

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