Create a Friend class

  • 4
  • Locked
Let's make up our own invisible friends, give them some qualities, and then go play with them, just like the other loners do! No? Okay, another time. We'll get through today by creating a friend template, i.e. a Friend class. And we'll make up three initializers for it: name, age and sex; only name and age; and only name.
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Johannes
Level 27 , Centurion, Pretoria, South-Africa
3 March 2020, 07:15
Requirements list "Name", but when marking, it requires "name", please fix bug ? thanks :)
Roman
Level 41
6 March 2020, 09:01
Where? Requirements: • The Friend class must have a String variable name. • The Friend class must have an int variable age. • The Friend class must have a char variable sex. • The class must have an initialize method that takes a name as an argument and initializes the corresponding instance variable. • The class must have an initialize method that takes a name and age as arguments, and initializes the corresponding instance variables. • The class must have an initialize method that takes a name, age, and sex as arguments, and initializes the corresponding instance variables.
Johannes
Level 27 , Centurion, Pretoria, South-Africa
6 March 2020, 10:17
Create the Friend class with three initializers (three initialize methods): - Name - Name, age - Name, age, sex
Roman
Level 41
10 March 2020, 07:25
This "Name" is not a variable name)
Turner
Level 11 , Pittsburgh, United States
27 July 2019, 15:47
Many 'initialize' programs are PRIVATE. Please clarify in your requirements. Also, correct your (N)ame parameter in the Friend class. It is NOT helpful having conflicting requirements.