Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that prompts the user to enter his/ her Id number in a String variable you must use your own SEU Id number

Write a program that prompts the user to enter his/ her Id number in a String variable you must use your own SEU Id number starting with SA. Then convert the last three digits of your Id to integer and increment them by 1.

Program typical run:

image text in transcribed

Your program should correctly implement the following components:

* Structure of a class.

* The main method.

* Input statement to receive the Id from the user as a String.

* subString() method.

* Convert from String type to int type.

* Appropriate output statements to communicate with the user and display the required result.

Besides writing down your codes in the answer, make sure you provide a screenshot of your code and the output. Any student who does not provide a screenshot shall get zero mark for this question.

run: Please enter your Id: SA160011234 The last three digits of your Id after increment by 1: 235 BUILD SUCCESSFUL (total time: 11 seconds)

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

How can we assess the effectiveness of treatment?

Answered: 1 week ago

Question

politeness and modesty, as well as indirectness;

Answered: 1 week ago