Results 1 to 4 of 4
- 12-05-2012, 01:10 AM #1
Member
- Join Date
- Nov 2012
- Posts
- 11
- Rep Power
- 0
Is it possible to simple this to where a first year ap student can understand?
Hi guys me and my teacher for computer science came up with this code together, to introduce how to make car models, and lisence plates. But unfortunantly our students does not understand how it is, and we tried to make it as simple as we could.
If its possible, do you guys think you can dumb this down a little? Because we have a bunch of 1st years in Computer Science AP, and we tried the best we can do but it isnt working.
whatever you guys can do to try and shrink it, but still make it able to recieve the programming that works.
Looking forward to ur replies ^_^
Java Code:import java.util.*; public class CarRental { public static void main(String[] args) { String mf; String model; String[] Manufacturer = {"Honda", "Toyota", "Volvo", "Lexus", "Hyundai","Mazda", "Ford", "Volkswagen", "Audi", "Mitsubishi", "Land Rover", "Suzuki", "Nissan", "Subaru", "BMW", "KIA", "GM"}; Scanner input = new Scanner(System.in); System.out.println("Welcome to Ryans Honestly Used Car Lot!"); System.out.println("Please enter your Car Manafacturer to see if we have it :"); mf=input.nextLine(); System.out.println("Wise choice there. Now please enter your Car Model:"); model=input.nextLine(); System.out.println("Model = " + model); String LPC; String RID = null; String LicensePlateCharacters = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); String[] LicensePlateNumbers = {"1234567890"}; System.out.println("Please enter your desired liscence plate, an example would be CPR 607:"); LPC =input.nextLine(); char[] License = LPC.toCharArray(); int number = 0; int sum = 0; for(int x =0; x<3;x++) { number+=(int)License[x]; System.out.print(number + " "); } sum = number; int si = sum+Integer.valueOf(LPC.substring(4)); int x = si % 26; char alphaCode = (char)((int)'a'+x); alphaCode=String.valueOf(alphaCode).toUpperCase().charAt(0); System.out.println(number); System.out.println("Your License Plate Should Be: " + LPC + " = " + alphaCode + si); System.out.println("Your rental ID From Us Is: " + alphaCode + si); System.out.println(""); System.out.println("Test Values:"); System.out.println(License); System.out.println(si); System.out.println(alphaCode); System.out.println(""); System.out.println(""); System.out.println("Heres Your Receipt:"); System.out.println(""); System.out.println("The Make = " + mf); System.out.println("Your Model = " + model); System.out.println("Your License Plate is: " + LPC + " = " + alphaCode + si); System.out.println("Your rental ID From Us Is: " + alphaCode + si); System.out.println("Thank you for using Ryans Honestly Used Car Lot, Remember! If it aint Ryans, It aint nothing!"); } }
- 12-05-2012, 01:50 AM #2
Senior Member
- Join Date
- Nov 2012
- Posts
- 105
- Rep Power
- 0
Re: Is it possible to simple this to where a first year ap student can understand?
I don't see whats so complicated about it, as long as you explain/comment on it well enough.
- 12-05-2012, 01:52 AM #3
Senior Member
- Join Date
- Nov 2012
- Posts
- 224
- Rep Power
- 1
Re: Is it possible to simple this to where a first year ap student can understand?
double post ?
Needs to be compressed in to simpler code.
-
Re: Is it possible to simple this to where a first year ap student can understand?
Please do not multipost the same question in the forum. This is not being fair to us. Locking this thread.
Similar Threads
-
Jsp:add student
By mamtha in forum New To JavaReplies: 6Last Post: 01-16-2012, 07:26 AM -
16 year old looking for help with simple Java program, help really appreciated!
By JavaProg in forum New To JavaReplies: 3Last Post: 11-05-2011, 03:52 PM -
student need help
By adamrain in forum New To JavaReplies: 9Last Post: 11-28-2009, 11:10 PM -
Date of first day, given the week in the year and the year...
By Lee.J.Baxter in forum Advanced JavaReplies: 1Last Post: 08-26-2009, 08:48 AM -
help student
By jvasilj1 in forum New To JavaReplies: 15Last Post: 02-02-2008, 08:23 AM


LinkBack URL
About LinkBacks

Bookmarks