•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 426,896 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,350 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 1990 | Replies: 3
![]() |
•
•
Join Date: Oct 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
This is urgent! I need an I/O code by today but I have no idea how to do it. Could anyone help a poor guy like me and maybe have some Java practice by writing a short code using the following information? I'll learn how it works later! Just help me now! Just post the whole coding within [code] ubb code before you post it.
Background:
When you rent a car from an agency, the key ring has several pieces of information: license plate, make and year of car, and usually a special code. This code could be used for some data processing within the company's computers.
Assignment:
I. The following sequence of steps will be used to convert a license plate into a car
rental code.
1. A license plate consists of 3 letters followed by a 3 digit integer value.
2. Type in the license plate information as 3 characters followed by a single
integer value. For example, CPR 607.
3. Add up the ASCII values of the 3 letters, 67 + 80 + 82 = 229.
4. Add the sum of the letters to the single integer value. For example, 229 +
607 = 836.
5. Take this sum (836) and determine the integer remainder after dividing by
26: 836 % 26 = 4.
6. Determine the 4th letter in the alphabet after the letter 'A': 4th letter after
'A' = E.
7. Combine the letter and the sum, the car id number for license plate CPR
607 = E836.
II. You may assume that all sample data will be in the format of 3 alphabet characters,
then a space, followed by a 3 digit integer
Instructions:
1. Prompt the user for the make and model of the car. Use strings to create this part.
2. Prompt the user for the license plate.
3. Print the run output in the following format:
Make = Chevrolet
Model = Suburban
CPR 607 = E836
4. Solve the following run outputs:
RJK 492
SPT 309
The input values for the make and model strings are your choice.
5. Turn in your source code and two run outputs.
Background:
When you rent a car from an agency, the key ring has several pieces of information: license plate, make and year of car, and usually a special code. This code could be used for some data processing within the company's computers.
Assignment:
I. The following sequence of steps will be used to convert a license plate into a car
rental code.
1. A license plate consists of 3 letters followed by a 3 digit integer value.
2. Type in the license plate information as 3 characters followed by a single
integer value. For example, CPR 607.
3. Add up the ASCII values of the 3 letters, 67 + 80 + 82 = 229.
4. Add the sum of the letters to the single integer value. For example, 229 +
607 = 836.
5. Take this sum (836) and determine the integer remainder after dividing by
26: 836 % 26 = 4.
6. Determine the 4th letter in the alphabet after the letter 'A': 4th letter after
'A' = E.
7. Combine the letter and the sum, the car id number for license plate CPR
607 = E836.
II. You may assume that all sample data will be in the format of 3 alphabet characters,
then a space, followed by a 3 digit integer
Instructions:
1. Prompt the user for the make and model of the car. Use strings to create this part.
2. Prompt the user for the license plate.
3. Print the run output in the following format:
Make = Chevrolet
Model = Suburban
CPR 607 = E836
4. Solve the following run outputs:
RJK 492
SPT 309
The input values for the make and model strings are your choice.
5. Turn in your source code and two run outputs.
•
•
Join Date: Sep 2004
Location: Overflow State
Posts: 183
Reputation:
Rep Power: 5
Solved Threads: 4
Greetings theon,
Welcome to DaniWeb. I have read your post, and overviewed the information. I was wondering which part of the code process you are struggling on, so maybe we can help assist your accomplish your task.
Remember for future reference that claiming urgency is very likely to be counter-productive which may reliably get you shunned or flamed.
- Stack Overflow
Welcome to DaniWeb. I have read your post, and overviewed the information. I was wondering which part of the code process you are struggling on, so maybe we can help assist your accomplish your task.
Remember for future reference that claiming urgency is very likely to be counter-productive which may reliably get you shunned or flamed.
- Stack Overflow
Following the rules will ensure you get a prompt answer to your question. If posting code, please include BB [code][/code] tags. Your question may have been asked before, try the search facility.
IRC
Channel: irc.daniweb.com
Room: #c, #shell
IRC
Channel: irc.daniweb.com
Room: #c, #shell
•
•
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation:
Rep Power: 11
Solved Threads: 102
•
•
•
•
Originally Posted by Stack Overflow
Greetings theon,
Welcome to DaniWeb. I have read your post, and overviewed the information. I was wondering which part of the code process you are struggling on, so maybe we can help assist your accomplish your task.
Remember for future reference that claiming urgency is very likely to be counter-productive which may reliably get you shunned or flamed.
- Stack Overflow
Indeed. This question looks just like a homework assignment, even.
Alex Cavnar, aka alc6379
![]() |
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
access activation api blogger blogging blogs code com combo dani daniweb data debugging development dreamweaver dropdownlist gdata google gpl html innovation java key linux microsoft microsoft sdk for java microsystems module net news open openbsd platform product programming reuse rss serial software source sun tags vista web wysiwyg xml
- xml parsing from java (Java)
- Urgent...Having problem with the following HTML code in IE7 (HTML and CSS)
- Excel to ASP database (ASP)
- opening files in classes (C++)
- Using Shell Script how to send mail automatically (Shell Scripting)
Other Threads in the Java Forum
- Previous Thread: Throws Clause
- Next Thread: StringTokenizer



Linear Mode