subject

You will write a program that will provide the X and Y coordinates based off of inputs entered into the console. The program will calculate the coordinate based on the directional commands provided: u-up, d-down, l-left, and r-right. lowercase and uppercase letters will be accepted. Numbers will also be accepted Numbers will also be accepted. Any other letters or characters should be ignored. Up and Down commands will change the y-values and Left and Right commands will change the x-values. A number preceding a letter will represent the number of commands for that direction.
Be sure to javadoc your code where applicable and provide meaningful comments.
A sample output is given below.
Enter your coordinate string command: ur
(1,1)
Enter your coordinate string command: urld
(0,0)
Enter your coordinate string command: uUr
(1,2)
Enter your coordinate string command: 2dd2d54r
(54,-5)
Enter your coordinate string command: 2?%gD
(0,-1)

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:30, huntbuck14
Which of the following methods could be considered a “best practice” in terms of informing respondents how their answers to an on-line survey about personal information will be protected? respondents are informed that investigators will try to keep their participation confidential; however, confidentiality cannot be assured. respondents are informed that a research assistant will transfer all the research data to a password-protected computer that is not connected to the internet, via a usb flashdrive. the computer is located in a research team member’s office. the investigator uses the informed consent process to explain her institution’s method for guaranteeing absolute confidentiality of research data. the investigator uses the informed consent process to explain how respondent data will be transmitted from the website to his encrypted database without ever recording respondents’ ip addresses, but explains that on the internet confidentiality cannot be absolutely guaranteed.
Answers: 1
image
Computers and Technology, 22.06.2019 11:00, babbybronx
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
image
Computers and Technology, 23.06.2019 16:30, isaiahhuettnerowgg8d
What is one reason why indoor air pollution has become an increasing problem.
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, bellamyciana
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
You know the right answer?
You will write a program that will provide the X and Y coordinates based off of inputs entered into...

Questions in other subjects: