Posts

Showing posts from April, 2025
  NAME : FAVOUR ISATU YILLAH I.D: I-24-63541 DEPARTMENT: INFORMATION TECHONOLOGY (I.T) FACULTY: THE FACULTY OF INFORMATION SYSTEM TECHNOLOGY  ASSIGNMENT: USING SCANNER TO SLOVE MATHEMATICAL PROBLEMS THAT RELATE TO SOME PLANE SHAPES. import java.util.InputMismatchException; import java.util.Scanner; public class Shapes { public static void main (String[] args) { Scanner fav = new Scanner(System. in ); while ( true ) { try { System. out .println( " \n Select a shape:" ); System. out .println( "1. Right Triangle" ); System. out .println( "2. Trapezoid" ); System. out .println( "3. Trapezium" ); System. out .println( "4. Rhombus" ); System. out .println( "5. Parallelogram" ); System. out .println( "6. Kite" ); System. out .println( "7. Exit" ); ...
NAME :  FAVOUR ISATU YILLAH I.D: I-24-63541 DEPARTMENT: INFORMATION TECHONOLOGY (I.T) FACULTY: THE FACULTY OF INFORMATION SYSTEM TECHNOLOGY   PRACTICE PROGRAM LECTURE FIVE (5) CONTROL FLOW import java.util.Scanner; public class Assignment { public static void main (String[] args) { Scanner sc = new Scanner(System. in ); // Q1. To determine whether the number entered by a user is even or odd. System. out .print( "Enter a number: " ); int number =sc.nextInt(); if (number % 2 == 0 ) { System. out .println( "The number is even. " ); } else { System. out .println( "The number is odd. " ); } // Q2. Grade obtained in 3 core Subject. System. out .print( "Enter The Grade Of Subject One(1): " ); int subject_one = sc.nextInt(); System. out .print( "Enter The Grade Of Subject Two(2): " ); int subject_two = sc.nextInt(); System. out .p...
NAME : FAVOUR ISATU YILLAH I.D: I-24-63541 DEPARTMENT: INFORMATION TECHONOLOGY (I.T) FACULTY: THE FACULTY OF INFORMATION SYSTEM TECHNOLOGY    THE PRACTICE PROGRAM FOR LECTURE FIVE OF ONE (5.1). (ITERATIVE STATEMENT) Q1. import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner fav = new Scanner(System. in ); /*Write a program that displays the multiplication table up to 12 iterations for any positive integer given by the user. For example, if the user inputs 6, your program should display the multiplication table for 6 for up to 12 iterations (i.e. 6*1 = 6, 6*2 =12, 6*3 = 18, ……… 6*12 = 72. */ System. out .print( "Enter a number from 1-12: " ); int number = profbock.nextInt(); for ( int a = 0 ; a <= 12 ; a++) { System. out .println(number + "x" + a + "=" +(number * a)); } } } Q2. import java.util.Scan...