Ledger Java Class

  • fifth_edition
  • Newbie
  • Newbie
  • fifth_edition
  • Posts: 7

Post 3+ Months Ago

Create a MAIN class Ledger (The class should be encapsulated) that will record the sales for a store. It will have the attributes
• sale—an array of double values that are the amounts of all sales
• salesMade—the number of sales so far
• maxSales—the maximum number of sales that can be recorded

Following methods should be added to the class

• Ledger(max)—a constructor that sets the maximum number of sales to max
• addSale(d)—adds a sale, to the array, whose value is d
• getNumberOfSales—returns the number of sales made
• getTotalSales—returns the total value of the sales
• getAverageSale()—returns the average value of all the sales
• getCountAbove(v)—returns the number of sales that exceeded v in value
• A main method that will test this class. The main methods should be included in this class and not as a separate file. The main method should ask the user to enter a particular sale (call the methods to enter the sale after performing important illegal checks and checking if the array has an empty space) and then ask the user if the sales have finished through a loop. After the sales have been finished, show the following outputs: number of sales made, total sales, average sales and number of sales greater than a user entered sale price!

i don't have anything started on this, don't even know how to start it. it is due in 6hrs and i really don't think i can get it done. if someone could do this program for me.. it would be really great! a million thanks if someone does do it. i really really need this badly. thanks!
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Spend less time asking ppl to do it for you and get to it! :P

One of my fav quotes:
Quote:
Procrastination on your part does not constitute an emergency on mine.
  • fifth_edition
  • Newbie
  • Newbie
  • fifth_edition
  • Posts: 7

Post 3+ Months Ago

well yea i am trying it , but i don't see how i can finish it in 5hrs!
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

fifth_edition, this is the second time you've posted here asing for other people to do your homework for you, and it's the second time you're not going to receive it.

Assuming that, being May, it's near the end of the semester, if you aren't able to complete basic assignments, have no interest and/or are not willing to put any effort into what you're studying, then perhaps you shouldn't be taking the class in the first place.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Quote:
but i don't see how i can finish it in 5hrs!


...and let me guess, you only received the assignment 6 hours before it was due? No, that's probably not right, but I'm sure it's someone else's fault that you procrastinated so horrifically.
  • fifth_edition
  • Newbie
  • Newbie
  • fifth_edition
  • Posts: 7

Post 3+ Months Ago

spork wrote:
fifth_edition, this is the second time you've posted here asing for other people to do your homework for you, and it's the second time you're not going to receive it.

Assuming that, being May, it's near the end of the semester, if you aren't able to complete basic assignments, have no interest and/or are not willing to put any effort into what you're studying, then perhaps you shouldn't be taking the class in the first place.


well it's not really the second time, it's the first! and who are u to tell me i shouldn't be taking that class.. if someone wants to help they can help. what's with the useless posts?
  • fifth_edition
  • Newbie
  • Newbie
  • fifth_edition
  • Posts: 7

Post 3+ Months Ago

UPSGuy wrote:
Quote:
but i don't see how i can finish it in 5hrs!


...and let me guess, you only received the assignment 6 hours before it was due? No, that's probably not right, but I'm sure it's someone else's fault that you procrastinated so horrifically.


nope not really. had it for a month now! and what's with the correcting yourself? u just answered ur own post.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

If you failed to notice, you're becoming outnumbered. You can make all the cute remarks you want and try to out-cool us or whatever you title your self-inflating behavior, but asking someone to do your work for you because you didn't bother to put forth the effort isn't really a great way to participate in our community.

EDIT: ftr, I confirm that this is your second of such requests

Now, you seem to have trouble in the comprehension department, so let's break it down...

I earned my degree, now grow up and do the same.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 63 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.