SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 5 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 06 Nov 2017 My Price 10.00

In this exercise, you’ll create an enumeration and then use it in a test

I am having trouble even getting started on this. I would like an Example of how its done. The netbeans code is attached in a zip and the instructions are attached in a word document.

In this exercise, you’ll create an enumeration and then use it in a test

application.

1. Open the project named chlO_ex4_Enumeration that’s in the ex_starts directory.

2. Create an enumeration named CustomerType. This enumeration should contain constants that represent three types of customers: retail, trade, and college.

3. Open the CustomerTypeApp class. Then, add a method to this class that returns a discount percent (.10 for retail, .30 for trade, and .20 for college) depending on the CustomerType variable that’s passed to it.

4. Add code to the main method that declares a CustomerType variable, assigns one of the customer types to it, gets the discount percent for that customer type, and displays the discount percent. Run the application to be sure that it works correctly.

5. Add a statement to the main method that displays the string returned by the toString method of the customer type. Then, run the application again to see the result of this method.

6. Add a toString method to the CustomerType enumeration. This method should return a string that contains “Retail customer,” “Trade customer,” or “College customer” depending on the customer type. Run the application one more time to view the results of the toString method.

Attachments:

Answers

(5)
Status NEW Posted 06 Nov 2017 11:11 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)