CH-4 Possibilities
CH-4 Possibilities Q.1 Multiple Choice Question . 1. Which soft skill is most essential for AI professionals who need to collaborate with others? a. Communication skillsb. Problem-solving skillsc. Technical skillsd. Research skills 2. What is the importance of data analytics in AI?a. Helps AI professionals learn how to code.b. Helps AI professionals develop algorithms.c. Helps […]
Write a Java Program to perform method Overloading.
Write a Java Program to perform method Overloading. Q.12 Write a Java Program to perform method Overloading. Solution :-Â class PrintLine {// Method to print a line of 40 asterisks (*)static void printLine() {for (int i = 0; i < 40; i++) {System.out.print(“*”);}System.out.println();} // Method to print a line of ‘#’ characters, repeated `n` timesstatic […]
Write a Java Program to find Area of rectangle .
Write a Java Program to find Area of rectangle . Q.13 Write a Java Program to find Area of rectangle . Solution :- class Rectangle {private double length, width; // Parameterized ConstructorRectangle(double x, double y) {length = x;width = y;} // No-Argument ConstructorRectangle() {length = 0;width = 0;} // Method to calculate the areadouble area() […]
Write a Java Program to find the Prime number.
Write a Java Program to find the Prime number. Q.11 Write a Java Program to find the Prime number. Solution :- import java.util.Scanner; public class Star {public static void main(String[] args) {// Create a Scanner object for inputScanner scanner = new Scanner(System.in); // Prompt the user to enter a numberSystem.out.print(“Enter a number to check if […]
Write a Program to print the following pattern.
Write a Program to print the following pattern. Q.10 Write a Program to print the following pattern. Solution :- public class Star {public static void main(String[] args) {int n = 5; // Number of rows for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) {System.out.print(“* […]
Write a Java Program to Check Whether the entered number is Even or Odd.
Write a Java Program to Check Whether the entered number is Even or Odd. https://youtu.be/a0JKRlI_uiM?si=E6ZHBvtBpcKqJASA Q.9 Write a Java Program to Check Whether the entered number is Even or Odd. Solution :- import java.util.*;class even_odd  {   public static void main(String args[])   {      int no1;       Scanner out = new Scanner(System.in);      System.out.println(“Enter the first […]
Write a Java program to calculate simple interest.
Write a Java program to calculate simple interest. https://youtu.be/q_559KvXnQI?list=PLzyEFfpN3YazBK4AppT6ejQ9xkB6h02FP Q.8 Write a Java program to calculate simple interest. Solution :- import java.util.*;class SimpleInterest{   public static void main(String args[])   {      Scanner in = new Scanner(System.in);   System.out.println(“Enter the Principle amount :-“);   double principle = in.nextDouble();   System.out.println(“Enter the Rate of interest :-“);   double rate = […]
Write a java program to find the minimum of two number using the if…else statement.
Write a java program to find the minimum of two number using the if…else statement. Q.7 Write a java program to find the minimum of two number using the if…else statement. Solution :-Â public class AverageCalculator{ Â Â public static void main(String[] args) { Â Â Â Â Scanner scanner = new Scanner(System.in); Â Â […]
Write a Java program to calculate the area of a square.
Write a Java program to calculate the area of a square. Q.6 Write a Java program to calculate the area of a square. Solution :- import java.util.Scanner; public class AverageCalculator {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);System.out.print(“Enter the side length of the square: “);double side = scanner.nextDouble();double area = side * side;System.out.println(“The […]
Write a Java Program to enter two integer number from the user and perform addition, substraction, division,multiplication and modules.
Write a Java Program to enter two integer number from the user and perform addition, substraction, division,multiplication and modules. Q.5 Write a Java Program to enter two integer number from the user and perform addition, substraction, division,multiplication and modules. Solution :- import java.util.*; class arithmetic { public static void main(String args[]) { Scanner in = […]