1. Are you ready for the Galaxy S20? Here is everything we know so far!

Rotation list

Discussion in 'Android Development' started by Rgeral, Jan 17, 2016.

  1. Rgeral

    Rgeral Lurker
    Thread Starter

    Take a look in the image below. It's actually three images put together, from three different events.

    https://drive.google.com/file/d/0B5hPPaHYQEn8MUktZzZiMGdod2c/view?usp=sharing

    They were created by an excel worksheet, using VBA. I have to send an image like that to nine people, using whatsapp.

    Now let me tell you the story behind the images:
    Say nine NFL players live together and share their vehicules to go trainning.
    They are:
    - J.J. Watt
    - Aaron Rodgers
    - Tom Brady
    - DeMarco Murray
    - Peyton Manning
    - Calvin Johnson
    - Andrew Luck
    - Antonio Brown
    - Marshawn Lynch

    They have four cars (a Toyota, a GM, a Volkswagen and a Hyundai), three motorcycles (a Kawasaki, a BMW and a Ducati) and two bikes.
    They always change vehicules in a certain order (bike, car, motorcycle, car, bike, car, motorcycle, car, motorcycle), in a way that the first guy who drives the Toyota will get to drive it again after 8 rotations.
    Say day one the sequence for players is 1, 2, 3, 4, 5, 6, 7, 8 and 9.
    Day two would be 9, 1, 2, 3, 4, 5, 6, 7 and 8.
    Day tree would be 8, 9, 1, 2, 3, 4, 5, 6 and 7.

    If today player "5" takes the BMW, it means player "4" takes the Volkswagen and player "6" takes the Hyundai. Tomorrow (or in the next rotation), player "5" will take the Hyunday, player "4" will take the BMW and player "6" will take the Ducati.

    I make such rotation work with the mentioned VBA, but it would be nice if I could make it work on the cell phone.

    I'm just starting to learn about Java and Android. Could anybody help me?...
    Thanks a lot.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Deleted User

    Deleted User Guest

    Can you be more specific? What part of this do you need help with?
     
  3. Deleted User

    Deleted User Guest

    My thoughts. I'm reluctant to answer homework questions because it defeats the purpose of the assignment, which is for the assignee to learn. Spoon feeding answers does not really help the person in the long run.
    I would maybe offer advice if I saw some evidence that the person had thought about the problem, and done some work towards it, and the question was about a specific issue. That may have happened in this case, but I see no code, or effort being presented in the question.
     
    argedion likes this.
  4. Rgeral

    Rgeral Lurker
    Thread Starter

    My apologies... I know I should start by buying a book... and hopefully I'll have plenty of time just to have fun with it, but by the time I just hoped someone could guide through the steps of reading just the chapters I need to accomplish my goal.

    This is the code I use on Excel:

    Public Sub Apply_Rotation()

    Application.ScreenUpdating = False
    Application.EnableEvents = False

    Range("C10") = Range("C9")
    Range("C1:C8").Copy
    Range("C2").PasteSpecial Paste:=xlPasteValues
    Range("C1") = Range("C10")

    Application.CutCopyMode = False
    Application.EnableEvents = True
    Application.ScreenUpdating = True

    End Sub

    I know it's not simply a matter of translating from one language to another, and I do have fun searching for VBA on foruns and making stuff with it at home.
    The point is I hoped I could get some help to speed up the coding for my rotation list, so I could improve from that on.

    By the way, it's not homework assignment. I use such a list in my work.
    We are nine people.
    Today I clean the room, tomorrow I take the trash out, the day after I get supplies, the next day I make phone calls...and so on. Everyday we do something different, but always in a fixed sequence and it always comes back from where it started.
     
  5. Deleted User

    Deleted User Guest

    To help you, it depends what your current level of knowledge is. And if it's not a homework assignment with a deadline, well you should have the time to start at the beginning, getting the basics. You cannot cherry pick this because you need a basic level of knowledge before you can start to do more complex things.
    Honestly it's very difficult to assist because we don't even know your experience with the Java programming language. Before you even start to build your first app, you should have a good grasp of Java.
     
Loading...

Share This Page

Loading...