Announcement

Collapse
No announcement yet.

Name Class

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Name Class

    main
    PHP Code:
    import people.*;

    /**
     * Created with xgiovio.macbookair.
     * User: xgiovio
     * Date: 23/09/13
     * Time: 14:57
     */


    public class test {

        public static 
    void main (String [] input_data){

                   
    Name cristiano = new Name("Sig""Padre""Eterno");

                   
    System.out.println("Iniziali = " cristiano.get_init());
                   
    System.out.println("Nome,Cognome = " cristiano.name_surname());
                   
    System.out.println("Cognome,Nome = " cristiano.surname_name());
                   
    cristiano.change_title("Cazzo io sono il Sig");

                    
    System.out.println("Nome completo = " cristiano.get_title() + " " cristiano.get_name() + ' ' cristiano.get_surname());




        }

    class
    PHP Code:
    package people;

    /**
     * Created with xgiovio.macbookair.
     * User: xgiovio
     * Date: 07/10/13
     * Time: 12:16
     */
    public class Name {


        public 
    Name (String in_titleString in_nameString in_surname){
                      
    title in_title;
                      
    name in_name;
                      
    surname in_surname;

        }

        public 
    String get_init (){

            return (
    title.substring(0,1) + name.substring(0,1) + surname.substring(0,1) );

        }


        public 
    String name_surname () {

            return (
    name ',' surname);
        }

        public 
    String surname_name () {

            return (
    surname ',' name);
        }

        public 
    void change_title (String new_title){

            
    title new_title;

        }


        public 
    String get_title(){
            return 
    title;
        }

        public 
    String get_name(){
            return 
    name;
        }

        public 
    String get_surname(){
            return 
    surname;
        }



        private 
    String title;
        private 
    String name;
        private 
    String surname;


    | VFX Artist, C++ Programmer, HW Overclocker | Web: xgiovio.com Email: xgiovio@gmail.com Twitter: @xgiovio
Working...
X

Google Profile


My name is Giovanni Di Grezia, but people call me xgiovio.

Here is my homepage:.

I'm a VFX Artist and Software Developer.

Giovanni Di Grezia