Man and woman

  • 8
  • Locked
Creating classes is easy and fun. Let's feel like the creators of a virtual universe and create Man and Woman classes. They must be declared inside the Solution class and be public static. They need to have "name", "age" and "address" fields. We also need to declare constructors with all possible parameters. Then we will be able to use them to create specific objects.
You can't complete this task, because you're not signed in.
Comments (10)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Vitalina
Level 20 , Poland
6 October 2020, 21:16
Attention! You have to make 2 objects of each type. It means: 2 Man objects and 2 Woman objects. And each object has to use the constructor with three variables..
Karas Java Developer
31 August 2020, 19:02
Make sure you create the objects USING the contructors.
Chakshu Gupta
Level 9 , Delhi, India
2 May 2020, 15:36
Can you help me what I am doing wrong?
Attila
Level 25
1 February 2020, 19:43
Thank you for teaching me how to use the toString() method.
Jaime Padilla
Level 8 , Tempe, United States
26 April 2021, 04:51
You're awesome
oli blaustrom
Level 18 , Luzern, Switzerland
13 December 2019, 18:18
Attention! Note that "" the quotes have a space between them. That's super unclear. It looked like empty strings.
Cam
Level 22 , Austin, United States
20 October 2019, 00:38
Great lesson to bring all the Level 5 ideas together!
Muhammad Vahhaaj
Level 19 , Rawalpindi, Pakistan
11 June 2019, 15:42
I have a question. If we can create our own String representation method to return a string for an object,i.e, getObjecttoString(); then what is so special about toString() that we have to override it then implement it similar as the above mentioned method to return the String. I mean as far as I can see there is no special reason to use toString() as it functions the same. So what makes toString() special and why should it be used?
Vikrat Rana
Level 8 , Ludhiana, India
2 October 2018, 05:10
can anyone tell me where am i doing wrong??
Roman
Level 41
2 October 2018, 06:20
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.