Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Retype the following code exactly as it is written Change the highlighted yellow parts and comment every line of code to explain its purpose. The

image text in transcribed

image text in transcribed

image text in transcribed

Retype the following code exactly as it is written Change the highlighted yellow parts and comment every line of code to explain its purpose. The comment header provided in Unit 1 should be added and completed. Compile the program and run it three times. In the first run, enter a 6-digit number, see what the result is and take a screenshot of each of the following the retyped program code the code after it is compiled, and the output of the program's run. Insert the screen shorts in the Ma Word document (see the recommended file name below). Then run the program again, but this time enter a 6-character word instead of a 6-digit number. Take a screenshot of the program's run, insert the screen short of the result into the same MS Word file, and explain why you have got the result you see. Then, run the program again, entering 11-digit number. Take a screen shot of the program run result, insert the screen shot into the same MS Word document explain why you see that result After completing all the steps above, check that your MS Word document includes all the required screen shots and your comments/explanations of each code run. Save the MS Word document as TicketNumber FirstinitialLastName doc. Zip the TicketNumber java and TicketNumberFirstinitiallastName doc into a zip file named UN2AssgnLastNameFirstinitial zip and submit the zip file for Acciamont Init in // TicketNumber.java Add Comment Header import javax.swing.JOption Pane; public class Ticket Number public static void main(String[] args) final int CHECKDIGIT = 7; String ticket String; int tickNum, newlickNum, lastDigit, remainder; boolean result; ticket String = soptionPane.showIngut Dialog(null) "Enter 6-digit ticke: number", Number Dialog", JoptionPane. INFORMATION_MESSAGE); tackNum = Integer.parseInt(ticketstring); 12300:9== = ckitum : 10; 9: 1225 neurokim = tem 10 removes laes 20:- 663 aceae digit remainder = newTickNum | CHECKDIGIT; result = (remainder == last Digit); JOptionPane.showMessageDialog(null, "For ticket number " + tickNum + ", last digit is " + last Digit + " and remainder is " + remainder + ", 30 result is " result)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Iv Special Issue On Database Systems For Biomedical Applications Lncs 6990

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Christian Bohm ,Johann Eder ,Claudia Plant

2011th Edition

3642237398, 978-3642237393

More Books

Students also viewed these Databases questions