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

  Create a simple warm-up program using your g3d

Create a simple warm-up program using your G3D programming and graphics environment.

  Shadow effect while rolling a sphere

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

  Relative positioning and interactive positioning

Relative Positioning and Interactive Positioning by Dragging and Clicking and some Simple Animation

  Draw a teapot at the global origin

Draw a teapot at the global origin

  Concepts of computer graphics

Concepts of Computer Graphics and develop a program using OpenGL

  The security policy document outline

Using the GDI Case Study below, complete the Security Policy Document Outline

  Develop the image manipulations

Develop the image manipulations

  What does resolution mean

What does resolution mean How is resolution connected to ppi and dpi units

  Differentiate between a bitmap image and a vector image

Differentiate between a bitmap image and a vector image Explain the following terms

  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..

  Framework of user interface design

design of user interfaces, natural mapping, GUI applications, web page design different to designing for printed media, risks exposed in this "phone as individual proxy" approach, interaction designers of ubicomp applications, Storyboards are usual..

  What are the factors affecting picture composition

Define picture composition What are the factors affecting picture composition. Elaborate on each factor Describe the basic lines present in a composition

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