Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

16,My GUI has a JTextField named queueNumber, and I want to display the value st

ID: 3542483 • Letter: 1

Question

16,My GUI has a JTextField named queueNumber, and I want to display the value stored in int x=12345 in it.  Write the Java code to do this.



17,Write a method named percent. percent accepts two doubles, divides the first one by the second one and returns the result.



18,Write a method named weekends that accepts no arguments, displays Saturday and Sunday, and returns no value.


19,Write a single Java statement that will randomly select one of the 12 months of the year and assign it to month (assume int month and Random ran are defined).



20,Write the statement(s) to create an instance of Contact, using the constructor :


public Contact (String firstName, String lastName, String email)

Explanation / Answer

16) queueNumber=new JTextField(x);

containerobject.add(queueNumber);


17)

double percent(double a,double b)

{return (a/b);}


18)

void weekends()

{ System.out.println("Saturday and Sunday"); }



19) int month= random.nextInt(10)+1;


20)


Contact abc=new Contact("first","Last","abc@gmail.com");

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote