Answer:
I think its D
lines graphics and symbols
Answer:
- public class Main {
- public static void main(String[] args) {
- System.out.println(firstDigit(1729));
- System.out.println(lastDigit(1729));
- System.out.println(digits(1729));
- }
-
- public static int firstDigit(int n){
- String n_str = Integer.toString(n);
- char firstChar = n_str.charAt(0);
- String firstDigit = Character.toString(firstChar);
- return Integer.parseInt(firstDigit);
- }
-
- public static int lastDigit(int n){
- String n_str = Integer.toString(n);
- char lastChar = n_str.charAt(n_str.length() - 1);
- String lastDigit = Character.toString(lastChar);
- return Integer.parseInt(lastDigit);
- }
-
- public static int digits(int n){
- String n_str = Integer.toString(n);
- return n_str.length();
- }
- }
Explanation:
Firstly we create a method firstDigit that will return the first digit of the input number (Line 8 - 13). This method will convert the input number, n, to string using Integer toString method (Line 9) and assign it to n_stry variable. Next, use charAt method with 0 index to get the first character from n_str and assign it to firstChar variable (Line 10). Next, use Character toString method to convert the firstChar to string type (Line 11) because the parseInt method which is used in Line 12 will only work on String type but not char type. The function return the firstDigit with integer type (Line 12). The parseInt method has converted the string type firstDigit to integer.
The logical steps defined for lastDigit method are similar to firstDigit except that we need to use .length() method to get the length of the digit string and calculate the last index to get the last digit (Line 17).
The digits method (Line 22 -25) will convert the input number to string and then use .length() method to return the length of the number string which is equivalent of number of digit as output.
Answer:
The application that allows users to do what is stated in the question is known as "Visual Simulation"
Explanation:
Visual simulation otherwise referred to as computer simulation projects a realistic graphical representation as it interacts with a particular stimuli. A very clear example is the popular flight simulator. It can be also used in the medical field and in business.
Going further, visual simulation has been expanded to virtual reality devices that are being used in many ways. Even though, the use of virtual reality devices for visual simulations is on the increase, many people still relate to visual simulation through games. These games project a two-dimensional image to look like a three-dimensional image using advanced graphics.
Individuals who work on visual simulation have some form of degree in engineering precisely, computer engineering. This is because it projects the basics in programming and engineering.
Answer:
ROM : Read Only Memory.
RAM : Random Ascess Memory.