Write the girlscout class assuming a girl scout object

Assignment Help Computer Graphics
Reference no: EM13329276

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

 

Reference no: EM13329276

Questions Cloud

Find how far from the girls initial position do they meet : A girl with mass m1 and a sled with mass m2 are on the frictionless ice of a frozen lake, How far from the girl's initial position do they meet
It department to meet the organization needs : If you were selected to be the CIO of an organization, what elements would you consider in building an appropriate IT department to meet the organization's needs?
Determine what amount must friend deposit annually : Your friend intends to invest her money in the local credit union, which offers 7.9 percent interest per year. She wants to make equal annual payments on each birthday into the account established at the credit union for her retirement fund.
What is the magnitude of the bodys acceleration : Only two horizontal forces act on a 6.3 kg body. One force is 6.0 N, acting due east, and the other is 8.3 N, What is the magnitude of the body's acceleration?
Write the girlscout class assuming a girl scout object : 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).
Find how much work is done by such proteins : Biological muscle cells can be thought of as nanomotors that use the chemical energy of ATP to produce mechanical work. How much work is done by such proteins
Calculate her altitude as she crosses the bar : A 54-kg pole vaulter running at 11 m/s vaults over the bar. Her speed when she is above the bar is 1.7 m/s, determine her altitude as she crosses the bar
Utilize your knowledge of supply-demand analysis and show : Utilize your knowledge of supply/demand analysis and show graphically the impact of a government minimum wage of $6 hour with a market wage for unskilled workers of $7 hour with 1 million workers employed at the market wage.
Part of domestic or municipal law : Explain this statement and give particular examples of treaties ratified by the Australian government which have become part of domestic or municipal law.

Reviews

Write a Review

Computer Graphics Questions & Answers

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

  Calculate and plot projection of rectangle on image plane

There is a rectangle with vertices at (-6,-3,6)T, (3,-3,6)T, (3,3,9)T, and (-6,3,9)T. What is the 3x4 perspective camera matrix? Calculate and plot the projection of the rectangle on the image plane.

  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.

  Question about educational technology

Educational technology helps to create workers's training cheaper, more individual and more effective. Based on your experience, describe a method that exploits

  Modify the single-cycle datapath to implement ''add tozero''

Modify the single-cycle datapath to implement an instruction called 'add to zero' (addz). The 'addz' instruction adds two registers and stores the result in a register and also in the memory at address zero.

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

  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.

  What conclusion can be drawn from these limitations

what conclusion can be drawn from these limitations regarding the future direction in computerarchitectures ?

  Design portfolio that comprise design item and justification

Our goal for the campaign is to find a fun way to promote tap water as a healthier, cheaper and more environmentally friendly way to stay hydrated. We want tap water to become fashionable in the same way that bottled water companies have establish..

  Find spanning tree of g with maximum number of vertices

Given an undirected graph G = (V, E). Find a spanning tree of G with the maximum number of vertices that have degree 1. Show that this problem is NP-complete.

  Java applets based question

Class Graphics contains technique draw Oval, which takes as discussions the same 4-arguments as method drawRect.

  Opengl assignment using c++

This is an OpenGL assignment using C++. Work on a particle and mesh visualization tool. Data: Consider a point cloud as input data. Every point is described by a position p = (x, y, z) and a data value d = (d0,d1,d2).

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