Muhammad A.

asked • 07/10/21

Write java code and make same as GUI as Performa given description and save the input given by user (in form of string and radio button) in a excel file.

Proforma

Alumni Survey


(To be filled by Alumni - after the completion of each academic year)


The purpose of this survey is to obtain alumni input on the quality of education they received and the level of preparation they had at University. The purpose of this survey is to assess the quality of the academic program. We seek your help in completing this survey.


A: Excellent        B: Very good          C: Good          D: Fair            E: Poor

Knowledge

1.    Math, Science, Humanities and professional discipline, (if applicable)          (A) (B)       (C)       (D)      (E)

2.    Problem formulation and solving skills      (A)       (B)       (C)      (D)      (E)

3.    Collecting and analyzing appropriate data (A)       (B)       (C)      (D)      (E)

4.    Ability to link theory to Practice               (A)       (B)       (C)      (D)      (E)

5.    Ability to design a system component or process   (A)       (B)      (C)       (D) (E)

6.    Computer knowledge.                            (A)       (B)       (C)      (D)      (E)

II.    Communication Skills


1.    Oral communication                               (A)       (B)       (C)      (D)      (E)

2.    Report writing                                        (A)       (B)       (C)      (D)      (E)

3.    Presentation skills                                   (A)       (B)       (C)      (D)      (E)


III.   Interpersonal Skills


1.    Ability to work in teams.                         (A)       (B)       (C)      (D)      (E)

2.    Ability to work in arduous /Challenging situation  (A)       (B)      (C)       (D) (E)

3.    Independent thinking                             (A)       (B)       (C)      (D)      (E)

4.    Appreciation of ethical Values                 (A)       (B)       (C)      (D)      (E)


IV.   Management & Leadership Skills


1.    Resource and time management skills       (A)       (B)       (C)      (D)      (E)

2.    Judgment                                              (A)       (B)       (C)      (D)      (E)

3.    Discipline                                              (A)       (B)       (C)      (D)      (E)





V.      General Comments


Please make any additional comments or suggestions, which you think would help strengthen our programs. (New courses that you would recommend and courses that you did not gain much from)


___________________________________________________________________


___________________________________________________________________



VI.     Career Opportunities


___________________________________________________________________




VII.   Department Status


1.    Infrastructure                                         (A)       (B)       (C)     (D)      (E)

2.    Faculty                                                   (A)       (B)       (C)     (D)      (E)

3.    Repute at National level                           (A)       (B)       (C)     (D)      (E)

4.    Repute at international level                     (A)       (B)       (C)     (D)      (E)


VIII.  Alumni Information

1.                  Name (Optional):

2.                  Name of organization:

3.                  Position in organization:

4.                  Year of graduation:



Patrick B.

Use this as an example of how to group the option buttons
Report

07/10/21

Muhammad A.

add buttons in a Group “G”, with the help of “add()” Method. Example: G.add(Button1); G.add(Button2); For group 1 of Radio button Initialization of object of "ButtonGroup" class. G1 = new ButtonGroup(); Now Adding button in G1 G1.add(jRadioButton1); G1.add(jRadioButton2); G1.add(jRadioButton3); G1.add(jRadioButton4);
Report

07/11/21

Patrick B.

yes that is correct; will also need the event handlers to update the value of which one is selected; as you can see below, when the color is selected, the value is set to 1=RED,2=WHITE,3=BLACK; likewise for the size, the value is set to size=1=SMALL, 2=MEDIUM,3=LARGE
Report

07/11/21

Muhammad A.

I didn't get you properly but see this for action command while getting value from button to excel file . \\for creating file try{ FileWriter fw-new FileWriter ("DATA.csv", true); In below you may can change "A" option by "Excellent "as mention in form B for very good and so on... //1 jRadioButtonl.setActionCommand ("A"); jRadioButton2.setActionCommand ("B"); jRadioButton3.setActionCommand ("C"); jRadioButton4.setActionCommand ("D"); jRadioButton73.setActionCommand ("E"); //2 jRadioButton5.setActionCommand ("A"); jRadioButtoné.setActionCommand ("B"); jRadioButton7.setActionCommand ("C"); jRadioButtons.setActionCommand ("D"); jRadioButton74.setActionCommand ("E"); //3 jRadioButton9.setActionCommand ("A"); jRadioButton10.setActionCommand ("B"); jRadioButtonll.setActionCommand ("C"); jRadioButton12.setActionCommand ("D"); jRadioButton75.setAction Command ("E"); And so on Also you can as that every time run the code didn't delete the previous data that save in file. Thanks
Report

07/11/21

Muhammad A.

For "New Response" button you can use jTextFieldl.setText (""); jTextField2.setText (""); jTextField3.setText (""); jTextField4.setText(""); jTextField5.setText (""); buttonGroup1.clearSelection (); buttonGroup2.clearSelection (); buttonGroup3.clearSelection (); buttonGroup4.clearSelection (); buttonGroup5.clearSelection (); buttonGroup6.clearSelection (); buttonGroup7.clearSelection (); buttonGroup8.clearSelection (); buttonGroup9.clearSelection (); buttonGroup10.clearSelection (); buttonGroup1l.clearSelection (); buttonGroup12.clearSelection (); buttonGroup13.clearSelection (); buttonGroup14.clearSelection (); buttonGroup15.clearSelection (); buttonGroup16.clearSelection (); buttonGroup17.clearSelection (); buttonGroup18.clearSelection (); jTextAreal.setText(""); jTextArea2.setText (""); jTextArea3.setText (""); and so on here here setText for setting string to null and above one for clear the button group selection
Report

07/11/21

Muhammad A.

After getting string action command " A " or "excellent. Then can use this code. :. Stringql=buttonGroup1.getSelection().getActionCommand (); String q2 = buttonGroup2.getSelection ().getActionCommand (); String q3 = buttonGroup3.getSelection ().getActionCommand (); And so on And file writer becomes (here string like Name is your variable) try{ FileWriter fw-new FileWriter ("DATA.csv", true); fw.write (Crs_tit+", "+Name+", "+Sem+ ","+Dep+", "+Deg+ ","+ql+", "+q2 +","+q3+","+q4+", "+q5+", "+q6 +", "+q7+", "+q8+", "+q9+", "+q10+", " +q11+", "+q12+", "+q13+", "+q14+", "+q15+", "+ql6+", "+q17+", "+q18 +""+Inst+ " "+Crs + "+Depc); fw.write (System.getProperty( "line.separator")); JOptionPane.showMessageDialog(null, "Form has been submitted sucessfully" setVisisble (false); fw.close(); new InsertData().setVisisble (true); } catch (Exception e) (System.out.println(e); }
Report

07/11/21

Patrick B.

No I am writing to *.CSV file, which can then be opened in EXCEL. You did not specify the database.
Report

07/11/21

Muhammad A.

i'm also not saying for database but CSV file , for that code can be like this: try{ FileWriter fw-new FileWriter ("DATA.csv", true); fw.write (your strings and radio button data ave here); fw.write (System.getProperty( "line.separator")); JOptionPane.showMessageDialog(null, "Form has been submitted sucessfully" setVisisble (false); fw.close(); new InsertData().setVisisble (true); } catch (Exception e) (System.out.println(e); }
Report

07/11/21

Muhammad A.

is there any cofusion sir please let me know.
Report

07/11/21

Patrick B.

Yes that is what is being done in the code below: Writing to csv file so it can be opened in excel. The only difference is I have 2 groups of option buttons while your has 20 (too many!) Just make a class that stores the data and writes it to the csv file once the values in the option buttons are checked
Report

07/11/21

Muhammad A.

Is form completed?How long will it take to complete?
Report

07/11/21

Patrick B.

A very long time. You need 20 radio button groups and several text boxes. Will easily fill multiple forms. Way too big to fit here. That is why I asked you to use the code as an EXAMPLE and a model. Way too much
Report

07/11/21

Muhammad A.

which code you talking about sir! i didn't get that
Report

07/11/21

Patrick B.

The code below, which is currently being reviewed because of the @ symbol in it
Report

07/11/21

Patrick B.

This problem is solved for all intent and purpose and can be closed
Report

07/11/21

1 Expert Answer

By:

Patrick B. answered • 07/10/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.