From 1a15f62771f3fa95e07b448e84d4d997f5790cc0 Mon Sep 17 00:00:00 2001 From: Orange_Dugongo Date: Tue, 18 Oct 2016 12:04:36 +0200 Subject: [PATCH] got --- src/Name/Name.class | Bin 1055 -> 1214 bytes src/Name/Name.java | 107 ++++++++++++++++++++++---------------- src/Name/NameTester.class | Bin 831 -> 888 bytes src/Name/NameTester.java | 22 ++++---- 4 files changed, 72 insertions(+), 57 deletions(-) diff --git a/src/Name/Name.class b/src/Name/Name.class index 16db927b0577aa01e3879c47a56a15658291e64a..9589939f4a91f6bd0a4c2b3cf5d1e6bb5261a3c7 100644 GIT binary patch literal 1214 zcma))Yi|-k6o%hnxh%_;Qtqv`(hHPJ3*M^KR*f++L7Qp<@%w@svJEVTi@!?~!Nd># z0DqM6onf`Dpz#A|nKSQs=DcU-`;V{R0NlqT15xbi*b8F?c^L{a>>DVeq@ygq6&(jU z4h`n325Pt+!krNA3iw^CZwtiFF02n$t!KI2T5~*f-0q1$U^L$hjGb|hqTs3HI^!n- zTCwz&rOyZNm|Z<{T>E^|Z`;F`)t0*b;v#J^BN4~{rCeSc>DuE4`*Ez^NFZ4(Ey@I< z6rIyyb26NJNiflpcCKahk(U)nEon)%8hFpCj0LjZzB8!3kr__Qw)!VhVl)SnVaI;q z$RUK~0aZCw6A2^*U}6<96KgWW5ewm-$=f>;@Ktjr9^j#XsPf0fO>BfvH*t(D&RLQK zVwX4cx_x1H*vpmF{L*;rXwn|33lvBf8;zw?33di<$0DGx%B>(xOPxYl$esu^r2F4UuPr1*DAXEMVQI7kj&{XuR82H33w$GSGfYE>- z5k`}!73QJ}mhoVZ3Dc-bDOg3a4yO1EDos=dVPpweXFnSXmGw}kMEQwI{((B2Vxg&B zD)&grlT@I$eKOV+Pdcn~S31m+B6q6bTI4 zx@7yTGdv6uf^=ncm+`M9+lnJ0;677`x`-*5M$|;zMFUNN*37$TVO=2XB=3L7WfKLi z>+&r+G!^X8U%kMw%N^NftaLH}6T1p3_417iLZG)kpZoVLMYL=L&42>lw#!qEFVb4NaQ;Nnv;Q!GN zkZ9r$@JAW%?UpbdAMA&FZ%@vB&UsGz>-YDc05aTR9k$p zV_VK=x{*gNf(h-G4*4o*y`mH%%0jvxX=)$%Rp9i|f&UOVthEJNi`BD389k#9q}7yDaBK#zTlD6jT^$(=lzt>(x8hv-Z~KmK|}0^-Pyq4WzD>EGlh0ZImC zs;B6!LS0bT)@Kl3X`ooBreiRP49?&z%}o6Qjh2Dl4)D&9d8`4wg4BCdB znZfK5(wHJUg%zVqcFxYvuzZ9U2tQ=lG|e?vNsW~a=*Uqm!6e&RG_Zs=Av?%p7X@;2 Jj(7>2{{!Vk#-RWJ literal 831 zcma)5-EI<55dIFZ?6RzY+fu8x)@rp2C|Ir4O7)^myjrUfQe(V2;0c~)f6TI&=xg{S zdI5<=TAlonEP5r{db!7 z=VsA#LfgR}7umDv0+rde&wIzJp9&O)D(&ht4roNxn@{H-Smz`02W1)ATc z7{#GFhzG2&4wt?velj2msFGYFZLU0E|SfqpJ5Ofc=a8b z*Ary@hMOD1_=%?KpyHok&QpAbo(-?VrZEOAm?)84 bCVvA()Zx(YQNljT@KM3hl*J{g&EWEH#~QO= diff --git a/src/Name/NameTester.java b/src/Name/NameTester.java index d46ebf5..888f979 100644 --- a/src/Name/NameTester.java +++ b/src/Name/NameTester.java @@ -2,21 +2,17 @@ import java.io.*; public class NameTester{ public static void main(String [] args){ - Name persona1 = new Name(); - - persona1.setTitolo("Sig."); - System.out.println(persona1.title()); - - persona1 = new Name("Mario", "Rossi"); - persona1.setTitolo("Sig."); - System.out.println(persona1.iniziali()); - - persona1 = new Name("Maria", "Bianchi", "Sig.na"); - System.out.println(persona1.nomeCognome()); - System.out.println(persona1.title()); - + + Name persona = new Name(); + persona.setTitle("Sig."); + persona.print(System.out); //We expect Sig. + persona = new Name("Mario", "Rossi"); + System.out.println(persona.getInitials()); //We expect M. R. + persona = new Name("Jon", "Snow", "King in the North"); + System.out.println(persona.getNameSurname()); //We expect Jon Snow + System.out.println(persona.getTitleNameSurname()); //We expect a very big spoiler } }