Answer:
The code is given below
Explanation:
The correct syntax would be to place appropriate parenthesis.
(month==1?"jan":(month==2?"feb":(month==3?"mar":(month==4?"apr":(month==5?"may":(month==6?"jun":(month==7?"jul":(month==8?"aug":(month==9?"sep":(month==10?"oct":(month==11?"nov":"dec")))))))))));
Similarly, you can also use the following code:
String[] months = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" };
int month = 1;
String monthDescription = months[month - 1];
// This command takes input from the user.
Scanner input = new Scanner(System.in);
int response= input.nextInt();
// Making the variables required
int noCount =0 ;
int yesCount =0;
// Checking the response if it is 1 or 2 and reporting accordingly
if(response == 1 || response ==2){
yesCount+=1;
System.out.println("YES WAS RECORDED");
}
// Checking if the input is 3 or 4 then printing the required lines
else if (response == 3 || response ==4){
noCount+=1;
System.out.println("NO WAS RECORDED");
}
// if the input is not valid than printing INVALID
else{
System.out.println("INVALID");
}
Answer:
Explanation:
To develop the model for Creating the supertype/subtype relationship three diffrent types of notation is given bellow accrdig to the diagram attached.
1.Traditional EER (Enhance Entity-Relational) notation
2.Microsoft Visio notation
3.Subtypes Inside supertype note
<em><u>Traditional EER(Enhance Entity-Relational)notation for the international school of technology diagram is attached bellow</u></em>
The diagram consist of the following entity
Room Supertype
Media Entity Type
COURSE entity type
Section weak entity type
Schedule associatiative entity type
<u><em>Microsoft Visio Notation for the international school of technology is ashown in the diagram bellow.</em></u>
The diagram consist of the following entity
Room Supertype
Media Entity Type
Computer entity type
Instructor entity type
Time slot entity type
<u><em>Subtype Inside Supertype note Notation for the international school of technology is shown in the diagram bellow.</em></u>
The diagram consist of the following entity
Room Supertype
Media Entity Type
Computer entity type
Instructor entity type
Time slot entity type
Blood Alcohol Level is the other evidence for more severe penalties.
Answer:
Explanation:
import java.util.Scanner;
public class KboatTriangleAngle
{
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
System.out.print("Enter first angle: ");
int a1 = in.nextInt();
System.out.print("Enter second angle: ");
int a2 = in.nextInt();
System.out.print("Enter third angle: ");
int a3 = in.nextInt();
int angleSum = a1 + a2 + a3;
if (angleSum == 180 && a1 > 0 && a2 > 0 && a3 > 0) {
if (a1 < 90 && a2 < 90 && a3 < 90) {
System.out.println("Acute-angled Triangle");
}
else if (a1 == 90 || a2 == 90 || a3 == 90) {
System.out.println("Right-angled Triangle");
}
else {
System.out.println("Obtuse-angled Triangle");
}
}
else {
System.out.println("Triangle not possible");
}
}
}
OUTPUT: