Skip to main content

Posts

Showing posts from April, 2023

TCS Xplore 2023 Ion Proctored Exam ( IPA) 9 - JAVA coding solution ( 35 marks )

       Problem Statement : Create a class  Resort  and make attributes : int resortID; String resortName; String category; double rating; double price; Write  constructor and their getter and setter of all the attributes and make the attributes private . Write a Solution class and a main method inside it. Inside main method , create a method avgPriceOfGivenCategory . in this method you have to pass array object and one String input that will return integer value . we needs to check every object and if any object which has the category matched to string value taken by user and rating should be more than 4 then find then find the average price of the resorts .  It returns the average price and print it  and if  returns 0 and print "No any resort" . Input : 1001 abc resort 4 star 4.5 2000 1002 xyz resort 3 star 4.7 4000 1003 pqr resort 3 star 4.3 6000 1004 efg resort 3 star 4.9 5000 Code : import java . util .*; class Resort {     int resortId ;     String resortName ;     S

TCS Xplore 2023 - PL/SQL MCQ question for best practice ( iON Proctored Assessment )

              Multiple Choice Questions on PL/SQL PLSQL - Procedural Language/SQL Advantage :  It offers extensive error checking ,              numerous data types and               a variety of programming structures. Q1.  What is wrong in the following code snippet? DECLARE    x number := 1; BEGIN    LOOP       dbms_output.put_line(x);       x := x + 1;       IF x > 10 THEN          exit;       END IF;      dbms_output.put_line('After Exit x is: ' || x); END; A - There is nothing wrong. B - The IF statement is not required. C - There should be an END LOOP statement. D - The exit statement should be in capital letters. Ans : c Q2.  Consider the following code snippet: how many times the loop will run? DECLARE    a number(2); BEGIN    FOR a in 10 .. 20 LOOP        END LOOP; END; A - 11 B - 10 C - 9 D - Infinite loop Ans : A Q3.  Which of the following is true about PL/SQL package body? A - The package body has the codes for various methods declared in the package specificat

TCS Xplore 2023 - SQL MCQ question for best practice ( iON Proctored Assessment )

                     Multiple Choice Questions on SQL  ---------------------->>>>    Click Here : Subscribe to click   <<<<< --------------------------  SQL --  Structured Query Language Table Create -   create table CREATE   TABLE  STUDENTS (   ID  INT                             NOT   NULL ,   NAME   VARCHAR  (20)  NOT   NULL ,   AGE  INT                           NOT   NULL ,   ADDRESS  CHAR  (25),   PRIMARY   KEY  (ID)   );   Insert Values :   INSERT INTO Students ( ID , NAME , AGE , ADDRESS , SALARY ) VALUES ( 1 , 'Ramesh' , 32 , 'Ahmedabad' , 2000.00 ) ; ---------------------->>>>    Click Here : Subscribe to click   <<<<< -------------------------- Q1.    Which of the following is not a valid SQL type? FLOAT NUMERIC DECIMAL CHARACTER Ans : Decimal Q2.   Which of the following is not a DDL command? TRUNCATE ALTER CREATE UPDATE Ans : d Explanation :    DDL commands are used to define the structure of th

TCS Xplore 2023 - JAVA MCQ question for best practice ( iON Proctored Assessment )

           Multiple Choice Question ( JAVA )     ---------------------->>>>    Click Here : Subscribe to click   <<<<< -------------------------- PART - 01  Q1 . What is size of float and double ?         a.  32 and 64                      b. 32 and 32          c.  64 and 64                      d. 64 and 32  Ans : 32 and 64  Q2 .  What will be the output ?            short x=10;           x*=5;           System.out.println(x);         a.  50                                b. 10         c.  No output                    d. Compilation Error Ans : Compilation Error Q3.  find the error in which line ?          class A{             final a;             System.out.println(a);             }         a.  Line 1                           b. Line 2         c.  Line 3                           d. No Error Ans : Line 2 Q4.  Find the length of String ?         a. using string.length()         b. using string.length Ans : a  Q5.  Find the output ? class A{           .....

TCS Xplore 2023 Ion Proctored Exam ( IPA) 8 - JAVA coding solution ( 35 marks )

     Problem Statement : Create a class Universities and make attributes : int UniversitiesID; String UniversitiesName; String Location; double rating; boolean InnovativeLab; Write getter and setter of all the attributes and make the attributes private . Write a Solution class and a main method inside it. Inside main method , create a method countNumberOfInnovativeLabs . in this method you have to pass array object and two inputs one is string and one is double value. and we needs to check that is location of each object must be equal to string value and rating must be greater that the double value that will be passed in method . and also check how many labs are present that accepting above condition . It returns the count of such labs and print it  and if no any labs , then returns 0 and print "No any Labs" . Input : Code :

TCS Xplore 2023 - UI ( html , css ,JavaScript ) MCQ quistion for best practice ( iON Proctored Assessment )

                    Multiple Choice Questions on UI - Part 1 1.       Which of the below is the correct way to set a font size? a.       h2 {font-size:200pixels;}                       b. h2 {font-size:200;} b.       h2 {font-size:200px;}                              d. h2 {font-size:200%;} 2        To specify table border in CSS _____ proper is used a.       table-border                                                b. border b.       Tb-border                                                   D. tbl-border 3.       Block element can be aligned by setting the left and right margin to “align” a.       TRUE                                                          b. FALSE 4.       Output of the below script-          <html> <body> <p id=”showresult”> <b> Welcome To TCS </b> </p> <input type=”button” onclick=”display()” value=” Click Me”/> <script> function display()                 {                 b = document.getElementById(‘showresult