How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask John Your Own Question

John
John, Engineer
Category: Homework
Satisfied Customers: 778
Experience:  Bachelors Degree
27270878
Type Your Homework Question Here...
John is online now
A new question is answered every 9 seconds

ObjectivesThis assessment item is designed to test your understanding

Resolved Question:

Objectives
This assessment item is designed to test your understanding of arrays/arraylists, objects, classes, methods,
sorting and searching.
Assessment task
Write a java application that allows the user to read, display, sort and search the customer names
(type String, e.g. Ricky Ponting) and discounts (type double, e.g. 42.50) for N customers. N should
be declared as a constant and it should be equal to the largest digit of your student Id number (e.g. if
your Id number is XXXXX then N should be equal to 7 and you can declare it as final int N=7;).
The customer names and discounts must be stored in two separate single dimension
arrays/arrayLists (index 0 for customer 1 and index N-1 for customer N). The minimum and
maximum discounts which can be stored are 0 $ and 1000 $. The discount must be entered from the
keyboard and a validation for minimum and maximum values must be done. Your application
should display and execute a menu with the following options. A switch statement must be used to
execute the following menu options.
1. Read names and discounts for N customers
2. Display names and discounts for N customers
3. Display the minimum, maximum and average discounts
4. Find and display the customer names which have minimum discount
5. Find and display the customer names with the maximum discount
6. Sort the customer names in ascending order and display sorted names with their discounts
7. Search and display the customer names which have discounts equal to the given discount
8. Exit from application
1. Read names and discounts for N customers
This option reads names (e.g. Ricky Ponting) and discounts (e.g. 42.50) for all customers from the
keyboard and stores them in two separate single dimension arrays/arrayLists. If the discount is less
than 0 $ and greater than 1000 $ then an appropriate message should be displayed and the user
should be asked to enter a new discount.
2. Display names and discounts for all customers
This option displays the names and discounts stored in Arrays/ArrayLists for all customers.
3. Display the minimum, maximum, average discounts
This option calculates the minimum, maximum, average discounts and displays them. The average
is calculated by adding all discounts and dividing by N.
Submitted: 1 year ago.
Category: Homework
Expert:  Raj replied 1 year ago.
Hi There,

I will be helping you with the Solution.
If you have any PDF or Word file containing Requirement, can you please provide me the file.
If you have any code file that you want me to use than please provide me that one as well.

Thank you
Customer: replied 1 year ago.

it is in java and I just sent the assignment via email

Expert:  Raj replied 1 year ago.
First compress all the files you have together in one file.

STEP 1: GOTO Website www.wikisend.com
STEP 2: Upload your file there.
STEP 3: When Upload is 100% Complete it will provide the following details for the file:
FILE ID and Download Link
STEP 4: Copy both the details and post them here.

Thank You.
Customer: replied 1 year ago.

  • File ID: 520154

  • http://wikisend.com/download/520154/coit29222Assignment2DetailT2_2013.pdf



Expert:  Raj replied 1 year ago.
Got it.

By when do you need the Solution code files?
Customer: replied 1 year ago.

as soon as possible
before 26/09

Expert:  Raj replied 1 year ago.
No Problem I will have your Solution ready on 24/09.

Is that fine with you?
Customer: replied 1 year ago.

That means tomorrow

I am chatting from Australia, we are a day ahead

Customer: replied 1 year ago.

I just would like to be sure not to get a very high level code.

I need you to add as many comments as you can so I can understand the code. I don't want to have the solution only, I need to know how the question has been solved by the code

Expert:  Raj replied 1 year ago.
No Problem I will include enough comments to make it easy for you to understand.
I will be submitting the code on 25/09.
Customer: replied 1 year ago.

cannot be in the 24/09

I need to study the code

Expert:  Raj replied 1 year ago.
Can you please specify the no. of hours left if you need it on 24/09
Customer: replied 1 year ago.

21- 24 hrs

Expert:  Raj replied 1 year ago.
Yes 24 hrs. is good Enough for me to finish the project.
Customer: replied 1 year ago.

I wish I can get exactly in 19 hrs

Thank you

Expert:  Raj replied 1 year ago.
I will try my best to finish the project and provide you solution ASAP.
Customer: replied 1 year ago.

Thanks Raj

Expert:  Raj replied 1 year ago.
You are welcome.
Customer: replied 1 year ago.

I didn't ask, what about the UML activity diagram?

Expert:  Raj replied 1 year ago.
You want me to do the UML Activity Diagram as well or just the code part?
Customer: replied 1 year ago.

the UML is a sub question in the assignment and I want you to do the assignment and all its parts, the UML activity diagram as well part as well

Expert:  Raj replied 1 year ago.
UML requires some time for planning and I specified the time line only for programming.
So if you want UML Activity diagram as well than I will be needing more time.
Will that be fine?
Customer: replied 1 year ago.

can you submit the code as we agreed and the uml activity diagram a couple of time after?

Customer: replied 1 year ago.

I mean a couple of hours after

Expert:  Raj replied 1 year ago.
ok no problem.
Customer: replied 1 year ago.

Hello Raj,

when are you gonna submit the code files?

I am waiting :)

Expert:  Raj replied 1 year ago.
I am still working on them.
Customer: replied 1 year ago.

2 more hrs?

Expert:  Raj replied 1 year ago.
Yes approx 2 hrs is fine.
Expert:  Raj replied 1 year ago.
I will need 9 more hrs. to complete the code and UML together.
will that be fine with you?
Customer: replied 1 year ago.

I need the code at least now, we agreed upon that yesterday

9 hrs is too much

Customer: replied 1 year ago.

You didn't reply me

Customer: replied 1 year ago.
Customer: replied 1 year ago.

Raj when are you gonna send me the solution ?

Customer: replied 1 year ago.

Raj when are you gonna send the solution

Customer: replied 1 year ago.

You there?

Customer: replied 1 year ago.

I'm dealing with a trust, please don't put in a bind and tell your are gonna send me the solution today

Expert:  John replied 1 year ago.
hi

I am john

do you need this
Customer: replied 1 year ago.

hi john

do u receive my assignment?

I need to receive its solution in 11 hrs
can u?

Customer: replied 1 year ago.

yes this link


time is very important for me

Expert:  John replied 1 year ago.
hi

within 11 hrs from now ,
i will send the within this time
Customer: replied 1 year ago.

you sure?1

Customer: replied 1 year ago.

ur not gonna opt out as the other expert did?

because he was sure as well

dont put me in a bind !

Expert:  John replied 1 year ago.
hi

this is already opted out, so any other expert can answer it
Customer: replied 1 year ago.

ok, I trust you



waiting for the solution in 10 hrs and 45 mins



Thank you

Customer: replied 1 year ago.

My maximum number in my student ID number is XXXXX

Expert:  John replied 1 year ago.
hi

ok then
Customer: replied 1 year ago.

There a question about UML activity diagram can you solve it

it is part of the assignment

Thank you


and please watch the time

Expert:  John replied 1 year ago.
hi

yes i saw it
Customer: replied 1 year ago.

Would u please add as many comments as you can so I can understand the code as well?


Appreciated
Thank you

Expert:  John replied 1 year ago.

hi

ok i will do

 

which java compiler you are using

Customer: replied 1 year ago.

I am very worried, I am gonna get the solution withing the time, John?

8 hrs remaining

Expert:  John replied 1 year ago.
hi

yes sure

which java compiler you are using

Customer: replied 1 year ago.

NetBeans IDE 7.3.1

Expert:  John replied 1 year ago.
hi

ok i will send this within time

please check after 7 hrs
Customer: replied 1 year ago.

OK, sure


Thanks

Expert:  John replied 1 year ago.
hi
ok see you
Customer: replied 1 year ago.

2 more hrs?

Expert:  John replied 1 year ago.
hi

yes i will send within 1hr
Customer: replied 1 year ago.

done?

Expert:  John replied 1 year ago.
hi

have to finish the sorting only

how much time left
Customer: replied 1 year ago.

45 mins

Expert:  John replied 1 year ago.
hi

ok i will send within that
Expert:  John replied 1 year ago.
hi

the answer links are below

http://ge.tt/1P01Tts/v/0

and the word file

http://ge.tt/7ScBTts/v/0

hope this helps
Customer: replied 1 year ago.

Hello John


Thank you for being on time

The N has to be equal to 8 in my case

plus, some imported packages are too advanced way for me


"ArrayList();" we didn't use this sign before "<>"

 

..i could not tell which package is related to it.it's like less than more than sample.

Expert:  John replied 1 year ago.
hi

so you want any changes in this
Customer: replied 1 year ago.

yeah please, I need the code to be less advanced

plus, My N is supposed to be 8

Expert:  John replied 1 year ago.
hi


you want to set N=8 and

you don't need ArrayList
Customer: replied 1 year ago.

Yes exactly

and we didn't study in our lectures those two packages


import java.util.Collections;
import java.util.Comparator;
import java.util.ArrayList;

Expert:  John replied 1 year ago.
hi

ok i will change

can you wait some time
Customer: replied 1 year ago.

yeah sure,

2 hrs?

Expert:  John replied 1 year ago.
hi
ok
Customer: replied 1 year ago.
point 6: sort by name: What you did is good. it is that you usually do in real programming; however the assignment says to implement your own sort method.

You cannot use the built-in sort algorithm. So you need to build a method.

Bubble sort is a common method, can you do it?
Expert:  John replied 1 year ago.
hi

thatis what i am changing now
Customer: replied 1 year ago.

however remember to use WHILE instead of FOR. the assignment says that. to use two WHILE statements and one IF statement.



In the below methods, when i = 0, you are comparing the variable with itself. so you could set i = 1. the program will be 0.000001 seconds faster.


public static void displayMinMaxAvg(Customer[] cust,int N)

{

double min=cust[0].getDiscount(),max=cust[0].getDiscount(),sum=0,avg;

for(int i=0;i<N;i++) // start i=1. sum= cust[0].getDiscount()

{


Expert:  John replied 1 year ago.
hi

where you want to use while loop
Customer: replied 1 year ago.

check point 6 in the assignment

6. Sort the customer names in ascending order and display sorted names with their discounts This option sorts the customer names in ascending order and display sorted names with their discounts. You can use any sorting algorithm which uses at least two while loops and one if statement. The built-in sort algorithm should not be used.

Expert:  John replied 1 year ago.
hi

ok then
Expert:  John replied 1 year ago.
hi

the modified code is below as per your requirements

http://ge.tt/7AAgPxs/v/0

if anything more, inform me
if it is ok, please rate my service
Expert:  John replied 1 year ago.
hi


please take this link

http://ge.tt/5qW4Wxs/v/0

hope this helps
Customer: replied 1 year ago.

I am gonna rate you know,


Just wanted to say thank you very much for being on time with me and for helping

I would appreciated if you can send me any source I can use to enhance my java programming skills, if possible


Thank you again

Expert:  John replied 1 year ago.
hi

Welcome

if you need my assistance in future , please forward your questions starting with my name "For John"
Customer: replied 1 year ago.

Sure :)

Thanks again

Expert:  John replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
John, Engineer
Category: Homework
Satisfied Customers: 778
Experience: Bachelors Degree
John and 11 other Homework Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3458
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3124
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2385
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1988
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1876
    Bachelors Degree and CPA with Accounting work experience
  • http://ww2.justanswer.com/uploads/avremote/photoa.jpg Seanna's Avatar

    Seanna

    Tutor

    Satisfied Customers:

    1781
    3,000+ satisfied customers, all topics, A+ work
 
 
 

Related Homework Questions