hi there guys
i have no experience doing jave code so i am wondering if you can help with something
i have been told to do a register code (the class register) for a game with windows pop in and out during the fill in blanks like name, surname, id number, etc
the game is a observation race and there are some rules like the limit of grups to register which is 7, each one has to be with a color,
so actually is what i need the java code for that,
i hope you can help me guys
thanks

Are you trying to learn how to design and write java programs
Or do you want some one to write a program for you?

write up some code first and then let us know what problems you are having

alright guys my bad i got the code but missing some parts of it, i´ll put my code later on because i am working right now but i´ll put it so you can help me with it
apologise for that
but thanks for considering my post
thanks

hi there hi here is my code about the register
need a register of 7 grups of 6 people each grup with a color
missing create the entering password and classes

thanks for the help

package com.edu.university.proyect;

public class Register {
    String name;
    Address address;
    int  phone;
    private int id;
    private String grupcolor;

    Register (String name, Address address, long phone, String grupcolor){
        this.name = new String (name);
        this.address = new Address (address);
        this.phone = (int) phone;
        this.id = (int) id;
        this.grupcolor = new String (grupcolor);
    }

    public void setName (String name){this.name = new String (name); }

    public void setAddress(Address address){
        this.address = new Address(address);}

    public void setAddress(String street, int number, int floor,
            char leter, int #, String neighbourhood, String state){
        address = new Address (street, number, floor, leter, #, 
                neighbourhood, state);
    }

    public void setPhone (int phone){this.phone = phone;}

    public String getName(){return name;}

    public Address getAddress(){return address;}

    public long getPhone(){return phone;}


    Registro (Register r){
        name = new String (r.name);
        address = new Address(r.address);
        phone = r.phone;
        setId(r.getId());
     }

    public void print (){
        System.out.println("Name: " + name);
        System.out.println("Address: ");
        address.print();
        System.out.println("Phone: " + phone);
        System.out.println("id: " + getId());
    }

    public String getGrupcolor() {
        return grupcolor;
    }

    public void setGrupcolor(String grupcolor) {
        this.grupcolor = grupcolor;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}

here it is the addres class inside the package created

package com.edu.university.proyect;

public class Address {

        private String street, neighbourhood, state;
        private int number, floor, #;
        private char leter;

        public Direccion(String street, int number, int floor,  char leter,
                int #, String neighbourhood, String state){
            this.street = new String (street);
            this.floor = floor;
            this.leter =leter;
            this.# = #;
            this.neighbourhood = new String (neighbourhood);
            this.state = new String (state);
            this.number = number;
        }

        public Address (address d){
            street = new String (d.street);
            number = d.number;
            floor = d.floor;
            leter = d.leter;
            # = d.#;
            neighbourhood = d.neighbourhood;
            state = d.state;
         }//en method address

        public void setStreet (String street){
            this.street = new String (street);
        }//end method set Street

        public void setNumber (int number){
            this.number = number;
         }//end method seyNumber

         public void setFloor(int floor){
                this.floor = floor;
         }//end method setFloor

         public void setNeighbourhood (String neighbourhood){
             this.neighbourhood = new String (neighbourhood);
        }//fin metodo setNeighbourhood

        public void setState (String state){
                this.state = new String (state);
        }//end method setState

        public void set# (int #){
                this.# = #;
         }//end method set#

         public void setLeter (char leter){
             this.leter = leter;
         }//end set leter


            public String getStreet(){return street;}
            public int get#(){return #;}
            public String getNeighbourhood(){return neighbourhood;}
            public String getState(){return state;}
            public int getFloor(){return floor;}
            public char getLeter(){return leter;}





         public void print (){
            System.out.println(street + ", " + number + " - " + floor + leter);
            System.out.println(# + " - "+ neighbourhood);
            System.out.println(state);
         }
    }//end print

Did you have any specific questions or problems with the code?

yes my questions are firstable if my code will work for registering the 7 grups with 6 people each if it is not how to do it
second if i need more classes or methods? (like typing methods for fill in blanks and how to make them and more classes like password and colorgrup and how to make them)
and thrird if i need junit test to run them all and how will be the way to do it
hope i was cleared enough

thanks for the support

if my code will work for registering the 7 grups with 6 people each

Have you tried testing it to see if it will do what is needed?

Look at your assignement to see if more code is needed.

I don't know anything about junit testing.

how do i add the class colorgrup for my code. i am trying to make that up but i have some ttrouble with it
any suggestions

Can you describe the purpose of that class? What data does it hold and what is it used for?
How will it be created? What other classes will use it? etc

well the purpose of this class is to identify each grup (7 groups) with a color and is used for that for that asign a grup with a color, doesnt matter the color, i need a idea to start the code if i need loops or how to make it, interating like this with each grup, do i need to create a class call grup or not?
thanks

If all the colorgrup class will hold is a color, why do you need it? Why not just have a class variable:
Color thisColor; // define the color for this group

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.