Results 1 to 4 of 4
  1. #1
    thomachan21 is offline Member
    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Default 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!");
                
            } 
       }

  2. #2
    Darkzombies is offline Senior Member
    Join Date
    Nov 2012
    Posts
    105
    Rep Power
    0

    Default 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.

  3. #3
    monkeyjr97 is offline Senior Member
    Join Date
    Nov 2012
    Posts
    258
    Rep Power
    3

    Default Re: Is it possible to simple this to where a first year ap student can understand?


  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default 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

  1. Jsp:add student
    By mamtha in forum New To Java
    Replies: 6
    Last Post: 01-16-2012, 08:26 AM
  2. Replies: 3
    Last Post: 11-05-2011, 04:52 PM
  3. student need help
    By adamrain in forum New To Java
    Replies: 9
    Last Post: 11-29-2009, 12:10 AM
  4. Date of first day, given the week in the year and the year...
    By Lee.J.Baxter in forum Advanced Java
    Replies: 1
    Last Post: 08-26-2009, 09:48 AM
  5. help student
    By jvasilj1 in forum New To Java
    Replies: 15
    Last Post: 02-02-2008, 09:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •