Login|Contact Us
Question and Answer

Programming

Ask a Programming Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

To RAJ: I have a new question for you when youre ready

 
Raj's Avatar
  • Answered by:Raj
  • Computer Engg.
  • Positive Feedback: 98.8 %
  • Accepted Answers: 856
Verified Expert
in Programming

Recent Feedback

Positive
Excellent work and exactly what I needed..Thanks!
Positive
Thank you Raj exactly what I am looking for can I ask for your help in the...
Positive
Great job!
Positive
Very knowledgeable. Explains everything, if you're struggling with an assignment...
Positive
Thanks
Positive
Thanks
Positive
Raj did the job fast an accurately!
Positive
Raj helped me quickly and taught me alot.
Positive
RAJ is great as always!

Customer Question

To RAJ:

I have a new question for you when you're ready.

Submitted: 324 days and 12 hours ago.
Category: Programming
Value: $45
Status: CLOSED
Picture
Expert:  Raj replied324 days and 12 hours ago.

Hello there,

Welcome Back.
Please post the question?

Customer replied324 days and 12 hours ago.

As always, please don't post anything until Saturday evening so that I have the opportunity to work on it without any influence to my own work.



Part 1

Design, implement, test, and debug a program with a JFrame that allows the user to enter a series of contacts’ names, ages, e-mail addresses, and cell phone numbers, and creates a file from the entered data. Validate the age entry to ensure that it is numeric and between 0 and 120. Include information for three to five contacts.

Part 2

Design, implement, test, and debug a program that reads the file you created by the list in Part 1 and displays the records in a JFrame. You may either display all entries in the list at once or display them one at a time; the user interface is up to you. Protect against not being able to open the file.

Submit the .java source files.

Picture
Expert:  Raj replied324 days and 12 hours ago.

How was Last Projects Form??
Did it go fine with Submission??

Will it be fine if I give you in same format as last One?

Customer replied324 days and 12 hours ago.

Yes, the format was good. I was able to make significant fixes and updates to my own code using the format you provided and I received a perfect grade on the assignment because of the corrections I was able to make using your example.


Picture
Expert:  Raj replied324 days and 12 hours ago.

Thats Good to know.

This Assignment contains two Parts. So I will have to underprice the Question according to the effort required.
You will receave an Underprice report in your e-mail containing the proposed Cost for the Question.

Do Let me know if my Proposed price is fine with you..

Thank You.

Customer replied324 days and 12 hours ago.

I could do $80 for the price, but that would tax my budget and I wouldn't be able to leave a tip afterwards, if this is acceptable to you I can increase the price of the question.

Picture
Expert:  Raj replied324 days and 12 hours ago.

Ok In that case I will suggest If The price I sent is fine with you than you can add the difference Amount (i.e. Proposed Amount - Orignal Question Amount) As TIP at the End.

Is that fine with you ?

Customer replied324 days and 12 hours ago.

Yes, I will add a $35 tip at the end to make the total payment $80. Thank you for all of the work you have put in over the past several weeks. I've been struggling with deaths in my family and my wife just had a miscarriage so it's been difficult trying to keep up with the work. Comparing my work to your examples and making corrections has honestly helped me out more than reading the material has.

Picture
Expert:  Raj replied324 days and 12 hours ago.

Sorry to hear that....
No Problem.

Its my Pleasure to help you.

Customer replied324 days and 12 hours ago.

So I will talk to you Saturday night when you post the completed parts of the assignment then?

Picture
Expert:  Raj replied324 days and 11 hours ago.

Ok
See you on Saturday than....

Picture
Expert:  Raj replied321 days and 21 hours ago.

Hi There,

I am ready with both the requirement parts.
Do Let me know when you need them by posting the message here.

Thank You.

Customer replied321 days and 18 hours ago.

I am travelling back from Maryland at the moment. Its been rough because of a major thunderstorm that trashed this area. Travelled through almost 300 miles of towns and cities with no power. I will be ready for them around 10pm EST

Picture
Expert:  Raj replied321 days and 17 hours ago.

Ok no problem.
Just leave back a message whenever you are ready for the solution.

Have a Good Day.

Customer replied321 days and 15 hours ago.

I'm home finally, ready to get started, give me about 15-20 minutes before you reply so I can get netbeans open and get my assignment up so I'm ready to compare to your work and I'll be ready to compare with your explanation as well.

Picture
Expert:  Raj replied321 days and 15 hours ago.

No Problem Take your time and let me know when you are ready....

Customer replied321 days and 15 hours ago.

I'm ready

Accepted Answer

Picture
Expert:  Raj replied321 days and 15 hours ago.

Ok
First I will provide you the files after that the explaination after that You ask me any doubts if anything is unclear.

I have compressed the Projects Like I use to provide you solutions before:

For Compressed project required for PART 1 use the Link below:
http://www.mediafire.com/?xzfyeon373bmgjj

For Compressed project required for PART 2 use the Link below:
http://www.mediafire.com/?ie481j9p4ecijg4

EXPLAINATION:
PART 1 :
Its a simple form with simple Mechanism.
User Inputs Data in TextField, And after entering data Clicks on ADD Button which checkes whether age is in range 0 TO 120(as asked in Question).
If Age is within the Range it stores the Values in Array and Increment count by 1.
If Age is Not in range(i.e. either LESS than 0 or MORE than 120) than user is asked to Enter the Age Again.

At The End when All the records are Entered the Array Values and COUNT value is stored in a text file at below location on Hard drive:
C:\Contacts.txt

NOTE :
The Text we store in above file is formatted Output so that in PART 2 we just Have to Read the Lines and Put in TextArea.

PART 2:
In This Part we Read the file we created in PART 1 (i.e. C:\Contacts.txt) and display in TextArea. Since We formatted the Data while saving in file in PART 1 So We just have to read and Place it in TextArea.

So When User Clicks on SHOW Button it Reads the Data from the file and Displays in TextArea.
When User Selects EXIT Button it simply Closes the GUI and Terminates the Program.


NOW let me know if you have any more Questions?

Expert TypeComputer Engg.
Category: Programming
Pos. Feedback: 98.8 %
Accepts: 856
Answered: 7/1/2012

Experience: BE CS, 4+ Experience in Programming and Database (ERP)

Ask this Expert a Question >
Customer replied321 days and 14 hours ago.

How did you choose what style to format the data in, or is it done automatically. That was the one area I have been struggling with in my own coding. I've ball parked the generic formats for both part 1 and part 2, but deciding how to format it has left me stalled. I'm comparing your coding to mine right now, to see the things you added/things I left out, but if you could give me insight into your decision process for how you formatted that would help me a lot.

I'm going to go ahead and accept your answer and add in the $35 tip as we discussed previously. But if you could respond with an answer to the above question I would greatly appreciate it.

Picture
Expert:  Raj replied321 days and 14 hours ago.

By Formatting do you reffer to the OUTPUT Format??
Which is displayed in TEXT AREA??Raj41091.1060529282

Customer replied321 days and 14 hours ago.

Yes, that output.

And if you could confirm that the money was added as we discussed/received. Thank you.

Picture
Expert:  Raj replied321 days and 14 hours ago.

Yes I got the Money on which we Agreed.
Thank You for that.

And Regarding String formatting.

When you will see the code for writeData( ) function in PART 1:
You will find inside a FOR Loop I have used a Function for temp i.e. (String.format )
Using that Function you can format the Strings Layout.

In That %s is for String Variables,
%d is for Integer/double, and many more Which exactly I don't remember all of them now.

Its format is as follows:
String.format("FORMAT_for_variable1 FORMAT_for_variable2 ..... ",variable1,variable2....)

Now in that you will see for Name i have written something like
Our command for formatting is as follows:
String.format("%25.25s\t%3d\t%25.25s\t%15.15s",name,age,email,phoneno);

In Above case
%25.25s is for name
%3d is for age
%25.25s is for email
%15.15s is for phoneno
\t is TAB

So I think by this point you would have understand How the order are specified.

Now The Output is always RIGHT Aligned by DEFAULT.
So when I Placed Age using %3d it will reserve 3 spaces for Displaying Age in Output as right aligned.
I used %3d because AGE can have three digit values as well like 100

Now for String If we Allign to right it was Looking odd as Right Aligned while display
So we specified no as %25s instead I used %25.25s which specify almost like Center Alligned i.e. same space from left and same spece from right.

If you have still any doubt than let me know.

Customer replied321 days and 14 hours ago.

So, after the %, if I would go 10.10 what exactly would that mean? I'm trying to get a grasp of what exactly the numbers are doing.

And what are the s and d doing? I've really been struggling with GUI and formatting issues, when it was simple coding I was doing okay, but now that the formatting and GUI portions are playing into our grade I really need to get a grasp on them.

Picture
Expert:  Raj replied321 days and 14 hours ago.

Ok Actually its different for String and Different for Double Type.

For String %10.10s
It means

RESERVE 10 BOX for STRING and KEEP it CENTERED.

In DOUBLE(REAL Type i.e. 10.22334)
%5.2d means
RESERVE 5 BOXES and Take Decimal value only upto 2 digits so It Will take 10.22 for Output.

s and d comes for String and real type data. Its Generally to represent what kind of data to expect from variables while formatting
Like if you specify d and pass String It will not work properly because d is denoting number and you are passing String so Order is Important as well.....

Actually This formatting works with Console Verson As well.
I have idea of using because in C Programming to print on screen its compulson to provide the formatting....

Customer replied321 days and 14 hours ago.

Okay,

Thank you very much. I am going to study this and work on adding in this formatting style into my next assignment. I will be sending you a new question on Tuesday when I begin working on the next assignment.

If it wasn't for your examples and your explanations I would probably be failing. Almost all of my knowledge and in-depth understanding has come from your examples and explanations.

Thank you very much for your help.

I will add in a similar tip for my next question(for all of your work and the extra help with the explanations because they have really helped me out more than reading the book material has), I just couldn't afford anymore for my weekly budget this week. Things have been tight, so I've had to get my budget down to how much I can spend per week for me and my wife.

Customer replied321 days and 14 hours ago.

Okay,

Thank you very much. I am going to study this and work on adding in this formatting style into my next assignment. I will be sending you a new question on Tuesday when I begin working on the next assignment.

If it wasn't for your examples and your explanations I would probably be failing. Almost all of my knowledge and in-depth understanding has come from your examples and explanations.

Thank you very much for your help.

I will add in a similar tip for my next question(for all of your work and the extra help with the explanations because they have really helped me out more than reading the book material has), I just couldn't afford anymore for my weekly budget this week. Things have been tight, so I've had to get my budget down to how much I can spend per week for me and my wife.

Picture
Expert:  Raj replied321 days and 14 hours ago.

You are Welcome.

I will be Travelling for next 2 weeks which starts TODAY.
But I will carry my Lappy So, Dont worry if I reply late for next 2 weeks because While travelling I face Internet connection issues a lot.

No Problem I can understand the Budget thing because I face the same at the end of the Month.


Attachments are only available to registered users.


Register Here



Have a Good Day.

Customer replied321 days and 14 hours ago.

So you will not be able to work questions for two weeks you mean? Or you just won't be able to respond right away on Tuesday. Or you won't have it ready by Saturday for me to study/ask questions/correct my own assignment?

Picture
Expert:  Raj replied321 days and 14 hours ago.

Ok
What I ment was like If you post Question on TUESDAY I might reply by WEDNESDAY or even THURSDAY but I will help you with your Question.

On Saturday I will be travelling So I will post the solution before I start Travelling and will post the Explaination as well but If you come accross any difficulty part than I will not be able to respond immediately because my net will not be working untill SUNDAY.

I am talking about next Week's Saturday and Sunday.
So if thats fine with you than I will be able to help you in both the weeks even while travelling..

Customer replied321 days and 13 hours ago.

Yes, as long as I have your example and at least a basic explanation so I can study and compare to my work with a correct version to look at it will still help me get a better grasp/understanding of the weeks material.

But I have to have them by Saturday, because the assignments are due on Sundays and I need time to study and correct my own work and study the explanations while looking over your example.

And as long as you can answer any questions I have by Sunday evening regarding parts of the assignment I'm stuck on or sections I don't understand we should still be good. I requested an early copy of the assignment we're supposed to be working on this week and the professor just emailed it to me. I'm going to drop it as a new question so you can go ahead and start working on it to make it easier for you.

But like before, please don't post anything before Saturday so I have a full week to work/screw up on my own :)

Picture
Expert:  Raj replied321 days and 13 hours ago.

No Problem.
I won't post them before Saturday.

Customer replied321 days and 13 hours ago.

I posted a new question for you, it has "To RAJ:" in it. If you want to look for it.

 
Tweet

7 Programmers are Online Right Now

Ask Your Question Now
Programming Questions Date Submitted
Microsoft Visual Basic 2010 Programming Exercise 5/16/2013
I am programming and auto reply macro and Outlook 10 that is 5/16/2013
Hello. I really need help with C Programming. I need a program 5/15/2013
I need to make the submit button bigger 5/15/2013
"For Jatechexpert" Part 1Programming Exercise 2—Calories 5/14/2013
INSTRUCTIONS: VERY IMPORTANT, THIS IS TO BE DONE USING MICROSOFT 5/13/2013
I have a JavaScript programming question. I have a form and 5/13/2013
Need a java programming to fulfill the following requirements: 1. 5/13/2013
I. Overview: Welcome to the CIT216 Practice Final 5/13/2013
Please help with this project https://www.dropbox.com/s/vs 5/12/2013
RSS
Next 10 >
Ask A Programmer
Type Your Programming Question Here...
characters left:

Top Programming Experts

See More Programmers

JustAnswer in the News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More
close
Find Expert answers related to your question.
Sign up using email
We will never post anything without your permission.
Already have an account? Sign in

Ask a Programmer

Get a Professional Answer. 100% Satisfaction Guaranteed.
196 Programmers are Online Now
Type Your Programming Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us | Our Network
© 2003-2013 JustAnswer LLC
  • Pearl.com
  • JustAnswer UK
  • JustAnswer Germany
  • JustAnswer Spanish
  • JustAnswer Japan