Question

(JAVA PROGRAMMING NEEDED)

My Invitation Dear, First Name: D Last name:I You are cordially invited to the Forum with Alumni on the 21h April 2019 Attend      

An invitation card is sent asking student to input their name to the forum.
The interface sketching is incomplete. Provide a suitable widgets on the interface. The
designer/developer may add more information on the interface that could assist the organizer such
as: id number, group number and other (only relevant information).
Then, the program, can produce a report that will list out students who can attend and cannot
attend to the program and also total numbers for both types. Develop a program that uses: Border
Pane and VBOX as the layout. The primary stage must have the title My Invitation, minimize,
maximize and close.

Submission for this question:

1) The design of the interface by hand (low-fidelity prototype) or.

2) The high-fidelity prototype.

5) The rationale of the widgets or UI components selection.

6) The use cases.

7) The JAVA source code with a good programming style

8) The Help description to use your simple program.

9) The output: The input interface and the report that consist both table and chart of the students attend or not attend.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MyInvitation.java

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JRadioButton;
import javax.swing.JTextField;

public class MyInvitation extends JFrame
{
  
   JLabel dear, id, course, fname, lname, message, attend, notatt;
   JTextField fld1, fld2, fld3, fld4;
  
   static int attendC = 0;
   static int notAttendC = 0, count=0;
   static boolean finalV = false;
   JRadioButton yes, no;
  
   public MyInvitation()
   {
       super("My Invitation");
       setLayout(null);
      
       dear = new JLabel("Dear,");
       dear.setBounds(50,50,100,30);
       add(dear);
      
       fname = new JLabel("First Name: ");
       fname.setBounds(50,80,100,30);
       add(fname);
      
       fld1 = new JTextField(25);
       fld1.setBounds(150,80,150,25);
       add(fld1);
      
       lname = new JLabel("Last Name: ");
       lname.setBounds(50,110,100,25);
       add(lname);
      
       fld2 = new JTextField(25);
       fld2.setBounds(150,110,150,25);
       add(fld2);
      
       id = new JLabel("ID:");
       id.setBounds(50, 140,100,30);
       add(id);
      
       fld3 = new JTextField(25);
       fld3.setBounds(150,140,150,25);
       add(fld3);
      
       course = new JLabel("Course");
       course.setBounds(50,170,150,30);
       add(course);
      
       fld4 = new JTextField(25);
       fld4.setBounds(150, 170, 150, 25);
       add(fld4);
      
       message = new JLabel("You are cordially invited to the Forum");
       message.setBounds(50, 200, 300, 15);
       add(message);
       JLabel message1 = new JLabel("with Alumni on 21 APril, 2019. ");
       message1.setBounds(50, 215, 300, 15);
       add(message1);
      
      
       yes = new JRadioButton();
       yes.setBounds(50,240,20,20);
       add(yes);
      
       attend = new JLabel("Attending");
       attend.setBounds(100, 240, 100, 20);
       add(attend);
      
       no = new JRadioButton();
       no.setBounds(50,260,20,20);
       add(no);
      
       notatt = new JLabel("Not attending");
       notatt.setBounds(100, 260, 100, 20);
       add(notatt);
      
       ButtonGroup grp = new ButtonGroup();
       grp.add(yes);
       grp.add(no);
      
       JButton submit = new JButton("Submit");
       submit.setBounds(180, 300, 100, 30);
       add(submit);
      
       submit.addActionListener(new ActionListener(){
           public void actionPerformed(ActionEvent e)
           {
      
               if(yes.isSelected())
                   attendC++;
               else
                   notAttendC++;
              
               if(attendC + notAttendC == count)
                   finalV = true;
              
               setVisible(false);
           }
       });
      
       setResizable(false);
       setLocation(100,100);
       setSize(400,400);
       setVisible(true);
   }
  
   public static void main(String[] args)
   {
       String msg = JOptionPane.showInputDialog(null, "Enter number of students: ");
       count= Integer.parseInt(msg);           // convert string to int
      
       for(int i = 0 ; i < count ; i++)
           new MyInvitation();
      
       if(finalV)
           System.out.println(attendC);
   }
}

Output:

My Invitation Dear, First Name: Last Name: ID: Course You are cordially invited to the Forum with Alumni on 21 A Pril, 2019.

Add a comment
Know the answer?
Add Answer to:
(JAVA PROGRAMMING NEEDED)        An invitation card is sent asking stude...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PYTHON PROGRAMMING LANGUAGE (NEEDED ASAP) Using a structured approach to writing the program: This section will...

    PYTHON PROGRAMMING LANGUAGE (NEEDED ASAP) Using a structured approach to writing the program: This section will guide you in starting the program in a methodical way. The program will display a window with GUI widgets that are associated with particular functions: Employee Payroll O X -- - - - - - - - - - - Show Payroll Find Employee by Name Highest Lowest Find Employee by Amount Write Output to Fie Cancel - -------- ------------- Notice that some of...

  • this is for java programming Please Use Comments I am not 100% sure if my code...

    this is for java programming Please Use Comments I am not 100% sure if my code needs work, this code is for the geometric if you feel like you need to edit it please do :) Problem Description: Modify the GeometricObject class to implement the Comparable interface and define a static max method in the GeometricObject class for finding the larger (in area) of two GeometricObject objects. Draw the UML and implement the new GeometricObject class and its two subclasses...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT