Questions
Code in Java Write a Student class which has two instance variables, ID and name. This...

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

Write a java program that prompts the user to see if they wish to encode or...

Write a java program that prompts the user to see if they wish to encode or decode a message.
(a) If they choose to encode a message:
i. Ask them to enter the message and store it in a String variable.
ii. Once the message is entered, ask them for a “shift” integer, similar to Lab 6.
iii. Using that shift, move all alphabetic characters in the message (i.e. excluding spaces and punctuation) using char and int arithmetic. Be sure to account for alphabetical wrap-
around!
iv. Ask the user for a filename (no spaces), and then output the encrypted message to that file
on a single line. Then you may terminate the program, or loop back to the beginning.
(b) If they choose to decode a message:
i. Ask them for the file name that stores their encrypted message.
ii. Ask them for the “shift” that was used to encrypt the message.
iii. Read in the message from the file into a String (assuming it is all on one line).
iv. Using the shift, reverse the encryption procedure by subtracting the shift from each character
of the message, taking into account wrap-around.
v. Print the decrypted message to the user. You may then terminate the program or loop back
to the beginning.

In: Computer Science

Identify the correct name for CI2O5.


Identify the correct name for CI2O5. 

dichlorine pentoxide 

dichloride pentoxide 

dichlorine tetroxide 

diiodine pentoxygen

In: Chemistry

Name the five tourism sectors

Name the five tourism sectors

In: Accounting

Give a common name for CH3CH2CH2CH2CCCH3

Give a common name for

CH3CH2CH2CH2CCCH3

In: Chemistry

Name the characters in A Rose for Emily

Name the characters in A Rose for Emily

In: Nursing

Name the three opportunity constraints.

Name the three opportunity constraints.

In: Economics

Name the 4 parts of the skull?

Name the 4 parts of the skull?

In: Anatomy and Physiology

Name and describe the stages of sleep

Name and describe the stages of sleep

In: Psychology

name the respiratory system structure

name the respiratory system structure

In: Nursing