Search Here

What you want from our side?
Showing posts with label Aspire Quiz. Show all posts
Showing posts with label Aspire Quiz. Show all posts

Latest ILP IRA Experienced...

Information about ILP (questions that were asked in IRA and some facts) started at Ahmadabad on 10th Nov...!!
1. Out of 218 candidates, only one was rescheduled on basis of score but HR gave some extensions to that unsuccessful candidate & it's under process
2. There is no need to worry about food, the food in canteen and on the stalls outside the office is good. P.S. it's not costly and you can have a number of varieties.
3. ILP Ahmadabad is very restrict about rules and documents, so better to avoid the things that are log allowed inside the office or flat. 2 female candidates were warned about termination as they brought some electrical equipment in flat.
4. Better to have atleast 5 trousers and 5 shirt because you wont get time to wash them and iron them & yes... you have to loose your pocket to get irond your clothes.
and finally here are some questions, that were asked in IRA 1....!!
- What is RAM?
-How many bits are there in a BYTE?
- which data type can holds the largest integer?
- who has authority and responsibility to access the blueprint of database?
-what is a primitive data type?
-how an array is initialized?
- how many phases are there in problem solving?
-what happens if there is no proper planning to solve a problem?
-a machine can be used to solve a problem by?
-what is automation?
-peripherals of computer are....? etc. etc.
and DBMS+ PROGRAMMING modules are very important to clear the IRA1.

Information Given By : Abhimanyu Sharma

ASPIRE Quiz

ASPIRE is an online interactive learning program for new recruits before they join TCS.
 The program is mandatory for all IT and EIS candidates. 

Courses  

Pre Assessment Test(PAT) 


Based on ASPIRE, there will be a PAT (Pre-Assessment Test) as soon as you join ILP to assess your
 level of preparedness for ILP.

Implication

Your Aspire participation score and PAT score will be one of the key factors in determining your 
allocation such as your posting location* and your ILP technical stream. 

QUIZ 
1. Know Your TCS5. Introduction to Java Basics
2. Unix6. Communication
3. Software Engineering7. Database Concepts
4. Basics of Programming8. Web Technologies

Assignment..

TCS ASPIRE : WEB TECHNOLOGY ASSIGNMENT

WEB TECHNOLOGY ASSIGNMENT
hello..friends.I am giving a link to download web-Technology assignment i.e Online Shopping Portal Case Study..
I did it in the way I like using  HTML, Javascript, PHP, CSS…
Hope it will be useful for you.
I suggest you people to modify if you need better designs..All the best :) enjoy..

TCS ASPIRE : DATABASE ASSIGNMENT

Question 1: Provide the create table syntax to Create a Table Employee whose details are as below.
Employee(EmployeeID, LastName, FirstName, Address, DateHired)
Create Table Employee (EMP_NO NUMBER (4) NOT NULL, LAST_NAME VARCHAR (25), FIRST_NAME VARCHAR (25), ADDRESS VARCHAR (50), DATE_HIRED DATE);

Question 2: Provide the INSERT query to be used in Employee Table to fill the Details.
INSERT INTO Employee (EMP_NO, LAST_NAME, FIRST_NAME, ADDRESS, DATE_HIRED) VALUES (311,’sayed’, ‘makdoom’,’ 311, radha aprts, kurla depot, mumbai’, SYSDATE);

Question 3: When we give SELECT * FROM EMPLOYEE .How does it Respond?
The command retrieves all the records from all the columns of the Employee table, i.e., it retrieves the entire data inserted into the table Employee.  

Question 4: Create a Table CLIENT whose details are as below.
Client(ClientID, LastName, FirstName, Balance, EmployeeID)
Create Table Client (CLIENT_NO NUMBER (3) NOT NULL, LAST_NAME VARCHAR (40), FIRST_NAME VARCHAR (40), BALANCE NUMBER (10), EMPLOYEE_ID NUMBER (5));

Question 5: Provide the INSERT query to be used in CLIENT Table to fill the Details.
INSERT INTO Client (CLIENT_NO, LAST_NAME, FIRST_NAME, BALANCE, EMPLOYEE_ID) VALUES (311,’sayed’, ‘makdoom’, 502, 31150);

Question 6: When we give SELECT * FROM CLIENT .How does it Respond?
The command retrieves all the records from all the columns of the Client table, i.e., it retrieves the entire data inserted into the table Client.

Question 7: Choose the correct answer. The SQL command to create a table is:
a. Make Table
b. Alter Table
c. Define Table
d. Create Table
 sol :Create table.

Question 8: Choose the correct answer. The DROP TABLE statement:
a. deletes the table structure only
b. deletes the table structure along with the table data
c. works whether or not referential integrity constraints would be violated
d. is not an SQL statement
sol: Deletes the table structure along with the table data




Question 9: What are the different data types available in SQL server?
The different data types available in SQL server are: 
 Exact Numeric
 Approximate Numeric
Date and Time
Character Strings
 Unicode Character Strings
Binary Character Strings

Question 10: Which is the subset of SQL commands used to manipulate Oracle Database structures, includingtables?
The Data Definition Language (DDL) commands are used to manipulate the Oracle Database structures, including tables. These include:
Create
 Alter
 Drop
  Rename
 Truncate
 Comment

Question 11: What operator performs pattern matching?
“LIKE" is the operator used in pattern matching.
 
Question 12: What operator tests column for the absence of data?
The IS NULL operator tests column for the absence of data.

 Question 13: Which command executes the contents of a specified file?
  The command “START <filename> or @<filename>” executes the contents of a specified file
 
Question 14: What is the parameter substitution symbol used with INSERT INTO command?
The & symbol is the parameter substitution symbol used with INSERT INTO command.

 Question 15: Which command displays the SQL command in the SQL buffer, and then executes it?
 The RUN command is used to display the SQL command in the SQL buffer and then execute it.

Question 16: What are the wildcards used for pattern matching?
The wildcards used for pattern matching are: 
    _ : for single character substitution  
   % : for multi-character substitution

 

Question 17: State whether true or false.
EXISTS, SOME, ANY are operators in SQL.
True. EXISTS, SOME, ANY are operators in SQL.

 Question 18: State whether true or false.
!=, <>, ^= all denote the same operation.
True. !=, <>, ^= all denote the same operation. They denote not equal to.

Question 19: What are the privileges that can be granted on a table by a user to others?
 The privileges that can be granted on a table by a user to others are: 
Insert
  Update
 Delete
  Select
  References
  Index
  Execute
  Alter
  All

Question 20: What command is used to get back the privileges offered by the GRANT command?
The REVOKE command is used to get back the privileges offered by the GRANT command.
 
Question 21: Which system tables contain information on privileges granted and privileges obtained?
 The tables USER_TAB_PRIVS_MADE, USER_TAB_PRIVS_RECD contain information on privileges granted and privileges obtained.

Question 22: Which system table contains information on constraints on all the tables created?
 The table USER_CONSTRAINTS contains all the constraints that have been set on all the tables for that particular session. When a new session is started, or a new user logs in the constraints mentioned in the USER_CONSTRAINTS may differ.

Question 23: What is the difference between TRUNCATE and DELETE commands?
 
 The DELETE command is used to remove rows from a table.
  A WHERE clause can be used to remove some rows only.
  If no WHERE condition is specified, all rows will be removed.
  After performing a DELETE operation you need to COMMIT the transaction to make the change permanent.
  If not committed, the change can be rolled back using the ROLLBACK statement, so the deleted data can be restored.

  This operation will cause all DELETE triggers on the table to fire.
 The TRUNCATE command removes all rows from a table.
  The operation cannot be rolled back, i.e., the operation is permanent.
  NO triggers will be fired.
  As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.

Question 24: What command is used to create a table by copying the structure of another table?
 The command CREATE TABLE... AS SELECT is used to create a table by copying the structure of another table.

Top of Form
Bottom of Form


IF you have More Question Share in Comment

TCS ASPIRE : BASIC PROGRAM ASSIGNMENT NO:2

Questions no 1
Write a program to accept an array of names and a name and check whether the
name is present in the array. Return the count of occurrence. Use the following
array as input
{“Dave”, “Ann”, “George”, “Sam”, “Ted”, “Gag”, “Saj”, “Agati”, “Mary”, “Sam”,
“Ayan”, “Dev”, “Kity”, “Meery”, “Smith”, “Johnson”, “Bill”, “Williams”, “Jones”,
“Brown”, “Davis”, “Miller”, “Wilson”, “Moore”, “Taylor, “Anderson”, “Thomas”,
Jackson”}
Improve the understandability of the below given code:
import java.util.*;
class problem3
{
int[] numArray = new int[10];
public static void incrementElements (int[] integerArray)
{
int arraylen = integerArray.length;
for (int i = 0; i < arraylen; i ++)
{
System.out.println(integerArray[i]);
}
for (int i = 0; i < arraylen; i ++)
{
integerArray[i] = integerArray[i] + 10;
}
for (int i=0; i < arraylen; i ++)
{
System.out.println(integerArray[i]);
}
}


Ans :Program in basic code
containing 10 elements, which defines the size of the array;
int num[]array=new int[10];
next the arraylength is calculated using integerArray.length,
and next using for loop we set a loop from 0 to the obtained length of the array
for (int i = 0; i < arraylen; i ++)
next the present integer value is incremented, by a value of 10 and then
the control passes to the next element in the array.
next we have the display the resulted array using the final code:
for (int i=0; i < arraylen; i ++)
{
System.out.println(integerArray[i]);
}





Programs in basic terms
 when any element of the integer array is occured then it is printed first and after that it's increamented by 10 ..
and then the resultant array is printed, the same code is being defined in the component classes of java.util.*-The Component class is
the abstract superclass of the nonmenu-related Abstract Window Toolkit components. Class Component can also be extended directly to create
a lightweight component. A lightweight component is a component that is not associated with a native opaque window.the code is predefined
in the package and when ever we want to execute any application
which wants the code...den without wrting the whole code we can directly import the package and execute .

Question 2
Greatest common divisor
Calculate the greatest common divisor of two positive numbers a and b.
gcd(a,b) is recursively defined as
gcd(a,b) = a if a =b
gcd(a,b) = gcd(a-b, b) if a >b
gcd(a,b) = gcd(a, b-a) if b > a
Improve the understandability of the below given code:
class Problem1
{
int[] a;
int nElems;
public ArrayBub(int max)
{
a = new int[max];
}
public void insert(int value)
{
a[nElems] = value;
nElems++;
}
public void Sort()
{
int out, in;
for(out=nElems-1; out>1; out--)
for(in=0; in<out; in++)
if( a[in] > a[in+1] )
swap(in, in+1); }
public void swap(int one, int two)
{
long temp = a[one];
a[one] = a[two];
a[two] = temp;
}
lass Problem1
 {
  int[] a;
  int nElems;
  public ArrayBub(int max)
   {
 a = new int[max];
   }
  public void insert(int value)
   {
 a[nElems] = value;
 nElems++;
   }
  public void Sort()
   {
 int out, in;
 for(out=nElems-1; out>1; out--)
  for(in=0; in<out; in++)
 if( a[in] > a[in+1] )
 swap(in, in+1);
   }
  public void swap(int one, int two)
   {
 long temp = a[one];
 a[one] = a[two];
 a[two] = temp;
   }
 }
Ans :Program in basic code
First  initialise number of elements and an array.
den  initialise max for a value and then set a varialble say a= maximum.
Later  accept the value for the elements.
Finally  set two variables out and in and we compare a[0] with a[1] and if a[0] > a[1] then swap them. As we see the highest value is reached at nth position.
At next iteration leave nth value. Then apply the same steps repeatedly on A[0],A[1],A[2]................ A[n-1] elements repeatedly until the values of array
is sorted.





Programs in basic terms

Bubble sort is also known as exchange sort. Bubble sort is a simplest sorting algorithm.
In bubble sort algorithm array is traversed from 0 to the length-1 index of the array and
compared one element to the next element and swap values in between if the next element is less than the previous element. In other words, bubble sorting algorithm compare two values and put the largest value at largest index. The algorithm follow the same steps repeatedly until the values of array is sorted. In worst-case the complexity of bubble sort is O(n2) and in best-case the complexity of bubble sort is O(n).

IF you have More Question Share in Comment

TCS ASPIRE : JAVA ASSIGNMENT NO : 02

1. Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff. acceptClothes accepts the noofClothes as argument & returns the noofClothes

import java.util.*;
class WashingMachine
{
Scanner input=new Scanner(System.in);
public void switchOn()
{
System.out.println("The Lid is Open.");
}
public void start()
{
System.out.println("Start Washing...");
}
public void acceptDetergent()
{
System.out.println("Adding Detergent..");
start();
}
public int acceptClothes()
{
System.out.println("Enter no of clothes:");
int no=input.nextInt();
return no;
}
public void switchOff()
{
System.out.println("The Lid is closed.");
}
public static void main(String args[])
{
WashingMachine wm=new WashingMachine();
wm.switchOn();
int numOfClothes=wm.acceptClothes();
wm.acceptDetergent();
wm.switchOff();
System.out.println(numOfClothes+"clothes get washed");
}
}





2. Create a calculator class which will have methods add, multiply, divide & subtract

import java.util.*;
class Calculation
{
public int add(int a, int b)
{
return a+b;
}
public int subtract(int a, int b)
{
if(a>b)
{
return a-b;
}
else
{
return b-a;
}
}
public int multiply(int a, int b)
{
return a*b;
}
public int divide(int a, int b)
{
if(a>b)
{
return a/b;
}
else
{
return b/a;
}
}

}
public class Calculator
{
public static void main(String args[])
{
Calculation cal=new Calculation();
int add=cal.add(5,10);
int sub=cal.subtract(5,10);
int mul=cal.multiply(5,10);
int div=cal.divide(5,10);
System.out.println("Taken Values are 5, 10");
System.out.println("Addition: "+add);
System.out.println("Substraction: "+sub);
System.out.println("Multiplication: "+mul);
System.out.println("Division: "+div);
}
}

3. Create a class called Student which has the following methods:
i. Average: which would accept marks of 3 examinations & return whether the student has passed or failed depending on whether he has scored an average above 50 or not.
ii. Inputname: which would accept the name of the student & returns the name.

import java.util.*;
public class Student
{
Scanner input=new Scanner(System.in);
public String average()
{
System.out.println("Enter Marks1: ");
double m1=input.nextDouble();
System.out.println("Enter Marks2: ");
double m2=input.nextDouble();
System.out.println("Enter Marks3: ");
double m3=input.nextDouble();
double tm=m1+m2+m3;
double avg=tm/3;
if(avg
{
return "Failed";
}
if(avg>50)
{
return "Passed";
}
return " ";
}
public String getName()
{
System.out.println("Enter Name: ");
String name=input.nextLine();
String result=average();

return name+" get "+result;
}
public static void main(String args[])
{
Student data=new Student();
String nameAndResult=data.getName();
System.out.println(nameAndResult);
}
}

4. Create a Bank class with methods deposit & withdraw. The deposit method would accept attributes amount & balance & returns the new balance which is the sum of amount & balance. Similarly, the withdraw method would accept the attributes amount & balance & returns the new balance ‘balance – amount’ if balance > = amount or return 0 otherwise.

import javax.swing.*;
class Customer
{
int bal;
Customer(int bal)
{
this.bal=bal;
}
int deposit(int amt)
{
if(amt
{
System.out.println("Invalid Amount");
return 1;
}
bal=bal+amt;
return 0;
}
int withdraw(int amt)
{
if(bal<amt>
{
System.out.println("Not Sufficient balance.");
return 1;
}
if(amt
{


System.out.println("Invalid Amount");
return 1;
}
bal=bal-amt;
return 0;
}
void check()
{
JOptionPane.showMessageDialog(null,"Balance:"+Integer.toString(bal));
}
}
public class Bank
{
public static void main(String args[])
{
Customer Cust=new Customer(1500);
String st1=JOptionPane.showInputDialog(null,"Enter the amount to deposit:");
int dep=Integer.parseInt(st1);
int bal1=Cust.deposit(dep);
Cust.check();
String st2=JOptionPane.showInputDialog(null,"Enter the amount to withdraw:");
int with=Integer.parseInt(st2);
int bal2=Cust.withdraw(with);
Cust.check();
}
}

5. Create an Employee class which has methods netSalary which would accept salary & tax as arguments & returns the netSalary which is tax deducted from the salary. Also it has a method grade which would accept the grade of the employee & return grade.


import java.util.*;
class Employee
{
static Scanner input=new Scanner(System.in);
public double netSalary(double salary, double taxrate)
{
double tax=salary*taxrate;
double netpay=salary-tax;
return netpay;
}
public static String grade( )
{
System.out.print("Enter Grade: ");
String grade=input.next();
return grade;
}
public static void main(String[] args)
{
Employee emp=new Employee();
System.out.print("Enter Salary: ");
double sal=input.nextDouble();
System.out.print("Enter Tax in %: ");
double taxrate=input.nextDouble()/100;
String g=emp.grade();
double net=emp.netSalary(sal,taxrate);
System.out.println("Net Salary is: "+net);
System.out.println("Grade is: "+g);
}
}
6. Create Product having following attributes: Product ID, Name, Category ID and UnitPrice. Create ElectricalProduct having the following additional attributes: VoltageRange and Wattage. Add a behavior to change the Wattage and price of the electrical product. Display the updated ElectricalProduct details.

import java.util.*;
class Product
{
int productID;
String name;
int categoryID;
double price;
Product(int productID,String name,int categoryID,double price)
{
this.productID=productID;
this.name=name;
this.categoryID=categoryID;
this.price=price;
}
}
public class ElectricalProduct extends Product
{
int voltageRange;
int wattage;
ElectricalProduct(int productID,String name,int categoryID,double price,int voltageRange,int wattage)
{
super(productID,name,categoryID,price);




this.voltageRange=voltageRange;
this.wattage=wattage;
}
public void display()
{
System.out.println("Product ID: "+productID);
System.out.println("Name: "+name);
System.out.println("Category ID: "+categoryID);
System.out.println("Price: "+price);
System.out.println("Voltage Range: "+voltageRange);
System.out.println("Wattage: "+wattage);
}
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("Enter Product ID: ");
int pid=input.nextInt();
System.out.println("Enter Name: ");
String name=input.next();
System.out.println("Enter Catagory ID: ");
int cid=input.nextInt();
System.out.println("Enter Price: ");
double price=input.nextDouble();
System.out.println("Enter Voltage Range: ");
int vrange=input.nextInt();
System.out.println("Enter Wattage: ");
int wattage=input.nextInt();
System.out.println("****Details of Electrical Product****");
System.out.println();
ElectricalProduct p=new ElectricalProduct(pid,name,cid,price,vrange,wattage);
p.display();
}
}










7. Create Book having following attributes: Book ID, Title, Author and Price. Create Periodical which has the following additional attributes: Period (weekly, monthly etc...) .Add a behavior to modify the Price and the Period of the periodical. Display the updated periodical details.

import java.util.*;
class Book
{
int id;
String title;
String author;
double price;
public void setId(int id)
{
this.id=id;
}
public int getId()
{
return id;
}
public void setTitle(String title)
{
this.title=title;
}
public String getTitle()
{
return title;
}
public void setAuthor(String author)
{
this.author=author;
}
public String getAuthor()
{
return author;
}
public void setPrice(double price)
{
this.price=price;
}
public double getPrice()
{
return price;
}
}
class Periodical
{
String timeperiod;
public void setTimeperiod(String timeperiod)
{
this.timeperiod=timeperiod;
}
public String getTimeperiod()
{
return timeperiod;
}
}
public class BookInformation
{
public static void main(String[]args)
{
Book b=new Book();
Periodical p=new Periodical();
Scanner input=new Scanner(System.in);
System.out.print("Book ID: ");
int id=input.nextInt();
b.setId(id);
System.out.print("Title: ");
String title=input.next();
b.setTitle(title);
System.out.print("Author: ");
String author=input.next();
b.setAuthor(author);
System.out.print("Price: ");
double price=input.nextDouble();
b.setPrice(price);
System.out.print("Period: ");
String pp=input.next();
p.setTimeperiod(pp);
System.out.println();
System.out.println("----Book Information----");
System.out.println();
System.out.println("Book ID: "+b.getId());
System.out.println("Title: "+b.getTitle());
System.out.println("Author: "+b.getAuthor());
System.out.println("Price: "+b.getPrice());
System.out.println("Period: "+p.getTimeperiod());
}
}

8. Create Vehicle having following attributes: Vehicle No., Model, Manufacturer and Color. Create truck which has the following additional attributes:loading capacity( 100 tons…).Add a behavior to change the color and loading capacity. Display the updated truck details.

import java.util.*;
class Book
{
int id;
String title;
String author;
double price;
public void setId(int id)
{
this.id=id;
}
public int getId()
{
return id;
}
public void setTitle(String title)
{
this.title=title;
}
public String getTitle()
{
return title;
}
public void setAuthor(String author)
{
this.author=author;
}
public String getAuthor()
{
return author;
}
public void setPrice(double price)
{
this.price=price;
}
public double getPrice()
{
return price;
}
}
class Periodical
{
String timeperiod;
public void setTimeperiod(String timeperiod)
{
this.timeperiod=timeperiod;
}
public String getTimeperiod()
{
return timeperiod;
}
}
public class BookInformation
{
public static void main(String[]args)
{
Book b=new Book();
Periodical p=new Periodical();
Scanner input=new Scanner(System.in);
System.out.print("Book ID: ");
int id=input.nextInt();
b.setId(id);
System.out.print("Title: ");
String title=input.next();
b.setTitle(title);
System.out.print("Author: ");
String author=input.next();
b.setAuthor(author);
System.out.print("Price: ");
double price=input.nextDouble();
b.setPrice(price);
System.out.print("Period: ");
String pp=input.next();
p.setTimeperiod(pp);
System.out.println();
System.out.println("----Book Information----");
System.out.println();
System.out.println("Book ID: "+b.getId());
System.out.println("Title: "+b.getTitle());
System.out.println("Author: "+b.getAuthor());
System.out.println("Price: "+b.getPrice());
System.out.println("Period: "+p.getTimeperiod());
}
}

9. Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results.

import java.util.*;
import java.text.*;
class NumberProgram
{
public static void main(String[] args)
{
DecimalFormat df=new DecimalFormat("##.##");
Scanner input=new Scanner(System.in);
System.out.print("Enter Number: ");
double num=input.nextDouble();
System.out.print("Raise Number's power: ");
double pow=input.nextDouble();
double value=Math.pow(num,pow);
System.out.println("Result is: "+df.format(value));
}
}

10. Write a function Model-of-Category for a Tata motor dealers, which accepts category of car customer is looking for and returns the car Model available in that category. the function should accept the following categories "SUV", "SEDAN", "ECONOMY", and "MINI" which in turn returns "TATA SAFARI" , "TATA INDIGO" , "TATA INDICA" and "TATA NANO" respectively.

import java.util.*;
class TataMotors
{
String category;
String model;
TataMotors(String category,String model)
{
this.category=category;
this.model=model;
}
public String getCategory()
{
return category;
}
public String getModel()
{
return model;
}
public static void ModelOfCategory(ArrayList<tatamotors> list)</tatamotors>
{
Scanner input=new Scanner(System.in);
System.out.print("Enter Category: (SUV/SEDAN/ECONOMY/MINI)");
String category=input.nextLine();
System.out.println();
System.out.print("Model is: ");
for (TataMotors tm : list)
{
if(tm.getCategory().equals(category))
{
System.out.print(tm.getModel());
}
}
}
public static void main(String[] args)
{
ArrayList<tatamotors> list=new ArrayList<tatamotors>();</tatamotors></tatamotors>
list.add(new TataMotors("SUV","TATA SAFARI"));
list.add(new TataMotors("SEDAN","TATA INDIGO"));
list.add(new TataMotors("ECONOMY","TATA INDICA"));
list.add(new TataMotors("MINI","TATA NANO"));
ModelOfCategory(list);
}
}


IF you have More Question Share in Comment