Question Details

(solution) Assignment 2 Due Date: December 2, 2015 To Submit: The source

I need urgent help with a simple Java Applet question. I have attached the relevant question and the text file needed. It would be ideal if you could submit the answer as a single source file, '

Thanks in advance!

Assignment 2


Due Date: December 2, 2015


To Submit: The source file,


Instructions for File Submission: Please upload your source file through Moodle.




Suppose that a university stores its employee records in a text file called ?Emp.txt?. The


file is available next to this assignment description.


The employee records are modeled using the following Record class:


public class Record {


private int empId;


private String telephone;


private String name;


private int years_of_Work;


public Record() {


empId = 0;


telephone = null;


name = null;


years_of_Work = 0;




public Record(int e, String t, String n, int y) {


empId = e;


telephone = t;


name = n;


years_of_Work = y;




public void setEmpId(int e) {


empId = e;




public void setName(String n) {


name = n;




public void setTelephone(String t) {


telephone = t;




public void setYears(int y) {


years_of_Work = y;




public int getEmpId() {


return empId;




public String getName() {


return name;




public STring getTelephone() {


return telephone;




public int getYears() { return years_of_Work;




public String toString() {


return name + " phone=" + telephone + " years of work=" +


years_of_Work + "






} Your task is to write the Java applet UpdateEmp which presents the user interface shown


below. All the user induced action in this applet is associated with the 3 buttons.


a) When the ?Get Record? button is first clicked the applet will retrieve the first


record from the text file and will display the information in the corresponding


textfields. Next time the ?Get Record ?button is clicked the second record from


the text file will be retrieved etc. The text file has one record per line with the


fields: employeeId, telephone, name, years_of_Work separated by spaces.


For example, the file contains the record:


10 416-555-6666 Burgess 15 ________________________________________________________________


Note: The space below the button Display All Records is a text area. b) The user is allowed to change information in all the textfields, except in the first


textfield which contains the employeeId value. Then by clicking the ?Update?


button the user will send the information from the textfields into an array of


100 Record objects. Simultaneously the textfields of the applet are made empty.


c) Assume that the user used the buttons ?Get Record? and ?Update? to create an


array of Record objects containing all the information of the text file. At the end


the user will click on the ?Display All Records? button and the information stored


in the array of Record objects will be displayed in the TextArea sorted by names


in alphabetic order. Use the method toString() of the Record class and the Bubble


Sort method for sorting. 2 3


Solution details:

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .

About this Question






Sep 13, 2020





We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.


Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.


Order Now