Code in Java
Write a Student class which has two instance variables, ID and name. This class should have a two-parameter constructor that will set the value of ID and name variables. Write setters and getters for both instance variables. The setter for ID should check if the length of ID lies between 6 to 8 and setter for name should check that the length of name should lie between 0 to 20. If the value could not be set, print a relevant message stating value could not be changed.
Finally, code a main method that will create an instance of Student class with ID as “5678654” and name as “Shawn” then print the ID and name to screen. Then use the setters to set the value of ID to “123456789” and name to “JohnCarlo” and then print the values of ID and name by using their getters.
In: Computer Science
In: Computer Science
Identify the correct name for CI2O5.
dichlorine pentoxide
dichloride pentoxide
dichlorine tetroxide
diiodine pentoxygen
In: Chemistry