function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shruthi MN 88Shruthi MN 88 

Write this code

HI Everyone ,

Can you help me write this code?
1.Create Employee class with three variables(name ,role,roleDescription) and one method(showEmployeeInfo()--> which prints employee data).
   Create two Objects and set those variable and execute that one method
2.Create a Bike class with printBikeColor() method and create two child class which overrides printBikeColor()
3.Create a StringAppender class and create two overloading methods .Method behaviour is to concatenate the given input strings.
4.Create a class name 'Parent' which has two methods showSurname() and showProperty()
  create a subclass 'Chile' which inherits only showProperty() method. 
5. In the first point Employee class. include a variable called salary and value must not be negative. Encapsulate salary variable with method.
6. Write executable code of above examples.  
AshwiniAshwini (Salesforce Developers) 
Hi Shruthi,
This seems to be a non-salesforce issue. 
This forum focuses on salesforce related issues and to ask questions, share knowledge, and engage in discussions about Salesforce products, features, best practices