Question: Instruction:java is required You must run and compile the attachments before attempting the exercises above.Screen shot of the outputYou must run and compile the attachments

Instruction:java is required
You must run and compile the attachments before attempting the exercises above.Screen shot of the outputYou must run and compile the attachments before attempting the exercises above./** Dr Babs/** Dr Babs* Machine Problem #1* Intro to Java Programming** First Applet Programming Problem*/import java.awt.*;import java.applet.*;import java.awt.event.*;public class prob5 extends Applet implements ActionListener{Label greeting = new Label("Enter Category 1-7");Font IFont = new Font("TimesRoman", Font.ITALIC, 14);Label head1= new Label(" SEAT SECTION ");Label head2= new Label("PRICE PER SEAT");Button submit = new Button("Submit");Button clear = new Button("Clear");TextField category = new TextField("",3);TextField name = new TextField("",15); TextField cost = new TextField("",9);public void init(){greeting.setFont(IFont);add(greeting);add(category);add(submit);add(clear);add(name);add(cost);add(head1);add(head2); category.addActionListener(this);category.requestFocus();submit.addActionListener(this);clear.addActionListener(this);}public void actionPerformed(ActionEvent thisEvent){int temp;String catString = category.getText();try{temp = Integer.parseInt( catString );}catch( NumberFormatException e ){temp =0;}switch(temp){case 1:name.setText("Courtside");cost.setText("35.00");category.requestFocus();break;case 2:name.setText("On The Floor");cost.setText("22.00");category.requestFocus();break;case 3:name.setText("The Perimeter");cost.setText("15.00");category.requestFocus();break;case 4:name.setText("Under The Hoop");cost.setText("13.00");category.requestFocus();break;case 5:name.setText("Above The Rim");cost.setText("12.00");category.requestFocus();break;case 6:name.setText("Full Court");cost.setText("12.00");category.requestFocus();break;case 7:name.setText("High Five");cost.setText("9.00");category.requestFocus();break;default:name.setText("INVALID");cost.setText("0");category.requestFocus();}if(thisEvent.getActionCommand()== "Clear"){category.setText("");name.setText("");cost.setText("");category.requestFocus();}invalidate();validate();}}Run this program to demonstrate spring manipulationimport java.util.Scanner;public class ThreeLetterAcronym{ public static void main(String[] args){ Scanner input = new Scanner(System.in); String tla ="", entry; int stringLength; int i; int count =0; int MAX =3; char c; System.out.print("Please enter three words: "); entry = input.nextLine(); stringLength = entry.length(); tla += Character.toUpperCase(entry.charAt(0)); ++count; for(i =1; i < stringLength; i++){ if(count < MAX){ if(entry.charAt(i)==''){++i; c = entry.charAt(i); c = Character.toUpperCase(c); tla += c; ++count; }}} System.out.print( "Original phrase was "+ entry +"
Three letter acronym is "+ tla); }}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!