+ All Categories
Home > Documents > Answers to Aspire In

Answers to Aspire In

Date post: 06-Apr-2018
Category:
Upload: kumar-abhinav
View: 218 times
Download: 0 times
Share this document with a friend

of 44

Transcript
  • 8/3/2019 Answers to Aspire In

    1/44

    ANSfiERS TO THE ASPIRE ASSISNMENTS:

    unix assignment-1: UNIX Assignment 1

    1.firite a command to list all the files inside a folder i.e. if there is afolder inside afolder then it should list all files inside the sub-folder which is inside the folder to belisted. Sol) $ find -type f

    2.

    Search all the files which contains a particular string, say include"within a folder.Sol) $ ls -F|grep -v /|xargs grep include$ find -type f -printO|xargs -O grep include

    3.

    Rename all the files within a folder with suffix Unix_" i.e.suppose a folder has twofiles a.txt and b.pdf than they both should be renamed from a single command toUnix_a.txt and Unix_b.pdf

    Sol) $ for f in $(ls -F|grep -v /);do mv "$f" "Unix_$f"; done

    4.

    Rename all files within a folder with the first word of their content(remember all thefiles should be text files. For example if a.txt contains Unix is an OS" in its first linethen a.txt should berenamed to Unix.txt

    Sol) $ for f in $(ls|grep .txt);do mv "$f" "$(cat $f|tr \n|head-1)".txt;done

    5.

    Suppose you have a C project in a folder called project", itcontains .c and .h files, italso contains some other .txt files and.pdf files. firite a Linux command that will

  • 8/3/2019 Answers to Aspire In

    2/44

    count the number of lines of your text files. That means total line count of every file.(remember you have to count the lines in .txt files only)

    Sol) $ ls|grep .txt|xargs wc l

    6.

    Rename all files which contain the sub-string foo, replacing itwith bar within agiven folder.

    Sol) $ for f in $(ls -F|grep -v /|grep "foo");do mv "$f" "${f//foo/bar}";done l.

    Show the most commonly used commands from history"? [hint:remember thehistory command, use cut, and sort it]

    Sol) $ history|cut -d -f5|sort|uniQ -c|sort -r|head -5

    unix assignment2:

    Answer-1

    Mkdir training training/level1 training/level2 training/cep level1/sdp level1/re

    level1/selevel2/sdp level2/re level2/se cep/sdp cep/re cep/se

    Answer-2

    Cp r dir1 dir2 command will copy a directory structure dir1 todir2

    .Answer-3

    Ls lg command is used to find out if you have the permission to send a message.Answer-4

    Ls l command is used to display all the content of directory along with size inbytes. Answer-5

    Date +%T command is used to display date and time in 24-hour format

    .Answer-6

    Date +%t command is for printing the year, month, and date with a horizontal

    tabbetween the fields.

    Answer-l

    Cat > chapaContents of fileCtrl+DCat > chapb

    Contents of fileCtrl+DCat > chapcContents of fileCtrl+DCat > chapdContents offileCtrl+DCat > chapeContents of fileCtrl+DCat > chapAContents of fileCtrl+DCat >

  • 8/3/2019 Answers to Aspire In

    3/44

    chapBContents of fileCtrl+DCat > chapCContents of fileCtrl+DCat > chapDContentsof fileCtrl+DCat > chapEContents of file Ctrl+DCat > chapO1Contents offileCtrl+DCat > chapO2Contents of fileCtrl+DCat > chapO3Contents offileCtrl+DCat > chapO4Contents of fileCtrl+DCat > chapO5Contents offileCtrl+DCat > chap11Contents of fileCtrl+DCat

    > chap12Contents of fileCtrl+DCat > chap13Contents of fileCtrl+D Cat >

    chap14Contents of fileCtrl+DCat > chap15Contents of fileCtrl+D Answer-8

    Ls [abcde] or Ls [a-z]

    Answer-9

    Ls [A-Z] Answer-1O Ls O? Answer-11

    Ls [bde] Answer-12

    Srep c programmer personnel

    Answer-13

    Sed n '/programmer/p personnel

    Answer-14

    Sed 's/programmer/software professional/g personnel

    Answer-15

    The command sleep

    waits a given number of seconds before continuing. Type

    % sleep 1O

  • 8/3/2019 Answers to Aspire In

    4/44

    This will wait 1O seconds before returning the command prompt %. Until thecommandprompt is returned, you can do nothing except wait

    DBMS ASSISNMENT 1:

    EMP

    EMP_NO NOT NULL NUMBER(4) EMP_NAME VARCHAR(25) DESISNATION CHAR(4)JOININS_DATE DATE SALARY NUMBER(l,2) DEPT_NO NUMBER(2)

    DEPT

    DEPT_NO NOT NULL NUMBER(2) DEPT_NAME VARCHAR(25) BUDSET NUMBER(15,2)MANASER VARCHAR(25)

    Create tables EMP, and DEPT, the structure for which are given above. firite SQLQueries for the following :

    1. Display each employee??s name and date of joining.

    2. Display employees earning more than Rs.5,OOO. Label the column name

    ??Employee??.

    3. Display all employee names and employee numbers in the alphabetical order ofnames.

    4. Display all employee names containing the letter ??S??.

    5. Display the employees hired in 1981.

    6. Display the minimum and maximum salary.

    l. Display the list of employees along with their department name and its manager.

    8. Display the number of different employees listed for each department.

    9. Delete the records of all the employees hired in 1981 from EMP table.

    1O. Update the salary of all the employees to Rs. 1O,OOO. Answers:

    11. select EMPNAME, JOININSDATE from emp

    12. select EMP_NAME as Employee from emp where SALARY>5OOO

    13. select EMPNAME, EMPNO from emp order by EMP_NAME

  • 8/3/2019 Answers to Aspire In

    5/44

    14. select EMPNAME from emp where EMPNAME like "%ra%"

    15. select EMPNAME from emp where YEAR(JOININSDATE)=1981

    16. select min(SALARY), max(SALARY) from emp

    1l. select e.EMPNAME, d.DEPTNAME, d.MANASER from emp e, dept d wheree.DEPTNO=d.DEPTNO

    18. select count(), d.DEPTNAME from emp e, dept d where e.DEPTNO= d.DEPTNO

    group by e.DEPTNO

    19. delete from emp where YEAR(JOININS_DATE)=1981

    2O. update emp set SALARY=1OOO

    1. write a program to find the difference between sum of the sQuares and thesQuare of the sums of n numbers?

    Program:

    import java.io.;

    importjava.util.Scanner;class Difference

    {

    publicstaticvoid main(String args[]) throwsIOException

    {

    Scanner s=newScanner(System.in);

    System.out.println("Enter the value of n: ");

    int n=s.nextInt();

    int a[]=newint[n];

    int i, sQr, diff, sum=O, add=O;

    System.out.print("The "+n);

  • 8/3/2019 Answers to Aspire In

    6/44

    System.out.println(" numbers are : ");

    for(i=O;i

  • 8/3/2019 Answers to Aspire In

    7/44

    Sum of SQuares of given 4 numbers is : 54

    SQuares of Sum of given 4 numbers is : 196

    Difference between sum of the sQuares and the sQuare of the sum of given 4numbers is : 142

    --------------

    2. Develop a program that accepts the area of a sQuare and will calculate itsperimeter.

    Program:

    importjava.util.Scanner;

    publicclassCalculateSQuarePeri

  • 8/3/2019 Answers to Aspire In

    8/44

    {

    /

    @paramargs

    /

    publicstaticvoid main(String[] args)

    {

    Scanner s=newScanner(System.in); System.out.println("Area of SQuare : "); doublea=s.nextDouble();

    double p=4Math.sQrt(a);

    System.out.println(""); System.out.print("Perimeter of the SQuare : "+p);System.out.println("");

    }

    } Output:

  • 8/3/2019 Answers to Aspire In

    9/44

    Enter the area:

    23

    Perimeter of the sQuare is: 19.183326O9325O8l6

    -----------------------------------------------------------------------------

    3. Develop the program calculateCylinderVolume., which accepts radius of acylinders base disk and its height and computes the volume of the cylinder.

    Program:

    import java.io.; importjava.util.Scanner; classcalculateCylinderVolume

    {

  • 8/3/2019 Answers to Aspire In

    10/44

    publicstaticvoid main(String args[]) throwsIOException

    {

    Scanner s=newScanner(System.in); System.out.println("Enter the radius : "); doublerad=s.nextDouble(); System.out.println("Enter the height : ");

    doubleht=s.nextDouble();

    doublevol=Math.PIradradht; System.out.println("");

    System.out.println("Volume of the cylinder is : " + vol);

    }

    }

    Output:

    Enter the radius :

    12

    Enter the height :

  • 8/3/2019 Answers to Aspire In

    11/44

    13

    Volume of the cylinder is : 5881.O6144l52OO93

    -----------------------------------------------------------------------------------------------------------

    --------------------------

    4. Utopias tax accountants always use programs that compute income taxes eventhough the tax rate is a solid, never-changing 15%. Define the program

    calculateTax which determines the tax on the gross pay. Define calculateNetPaythat determines the net pay of an employee from the number of hours worked.Assume an hourly rate of

    $12.

    Program:

    importjava.util.Scanner;

  • 8/3/2019 Answers to Aspire In

    12/44

    publicclasscalculateTax {

    /

    @paramargs

    /publicstaticvoid main(String[] args)

    {

    Scanner s=newScanner(System.in);

    System.out.println("Enter the no. of working days in the year : ");

    int d=s.nextInt();

    System.out.println("Enter the no. of working hours in a day : ");

    int h=s.nextInt();

    System.out.println("Enter the no. of hours worked in over time : ");

  • 8/3/2019 Answers to Aspire In

    13/44

    intot=s.nextInt();

    System.out.println("Enter the no. of hours took leave : ");

    int l=s.nextInt();

    double gross=((dh)+ot-l)12;

    double tax= grossO.15; double net=gross-tax; System.out.println("");

    System.out.println("Sross Pay (in $) : "+gross); System.out.println("Tax (in $) :"+tax); System.out.println("Net Pay (in $) : "+net);

    }

    }

    Output:

    Days worked by employer in a year :

    3OO

  • 8/3/2019 Answers to Aspire In

    14/44

    Enter the no. of working hours in a day :

    6

    Enter the no. of hours worked in over time :

    1

    Enter the no. of hours took leave :

    156O

    Sross Pay (in $) : 2892.O Tax (in $) : 433.8

    Net Pay (in $) : 2458.2

    -----------------------------------------------------------------------------

  • 8/3/2019 Answers to Aspire In

    15/44

    5. An old-style movie theater has a simple profit program. Each customer pays $5per ticket. Every performance costs the theater $2O, plus $.5O per attendee.Develop the program

    calculateTotalProfit that consumes the number of attendees (of a show) and

    calculateshow much income the show earns.

    Program:

    importjava.util.Scanner;

    publicclasscalculateTotalProfit

    {

    /

    @paramargs

    /

    publicstaticvoid main(String[] args)

    {

    Scanner s = newScanner(System.in); System.out.println("Enter the no. of attendeesof a show : "); int n=s.nextInt();

    double profit = (n5)-(2O+(nO.5)); System.out.println("");

    System.out.println("Total Profit of the theater per show (in $) is : " + profit);

    }

  • 8/3/2019 Answers to Aspire In

    16/44

    } Output:

    Enter the no. of attendees per show :

    5O

    Total Profit of the theater per show (in $) is : 2O5.O

    l. Develop the program calculateCylinderArea, which accepts radius of thecylinders base disk and

    its height and computes surface area of the cylinder.

  • 8/3/2019 Answers to Aspire In

    17/44

    Program:

    importjava.util.Scanner;

    publicclasscalculateCylinderArea

    {

    /

    @paramargs

    /

    publicstaticvoid main(String[] args)

    {

    Scanner s=newScanner(System.in); System.out.println("Enter the base radius : ");double rad=s.nextDouble(); System.out.println("Enter the height : ");doubleht=s.nextDouble();

    double area=2Math.PIrad(rad+ht);

    System.out.println("");

    System.out.println("Surface Area of the cylinder is : " + area);

    }

  • 8/3/2019 Answers to Aspire In

    18/44

    }

    Output:

    Enter the base radius :

    12

    Enter the height :

    Surface Area of the cylinder is : 1884.9555921538l58

    -----------------------------------------------------------------------------------------------------------

    --------------------------

  • 8/3/2019 Answers to Aspire In

    19/44

    8. Develop the program calculatePipeArea. It computes the surface area of a pipe,which is an open cylinder. The program accpets three values: the pipes inner radius,

    its length, and the thickness of

    its wall.

    Program:

    importjava.util.Scanner;

    publicclasscalculatePipeArea{

    /

    @paramargs

    /

    publicstaticvoid main(String[] args)

    {

    Scanner s=newScanner(System.in); System.out.println("Enter the inner radius : ");double rad=s.nextDouble(); System.out.println("Enter the length : ");

  • 8/3/2019 Answers to Aspire In

    20/44

    doublelen=s.nextDouble(); System.out.println("Enter the thickness : "); doublethick=s.nextDouble();

    double area=2Math.PI(rad+thick)len;

    System.out.println("");

    System.out.println("Surface Area of the pipe is : " + area);

    }

    Output:

    Enter the inner radius :

    13

    Enter the length :

    2O

    Enter the thickness :

    5

    Surface Area of the pipe is : 2261.946l1O584651

  • 8/3/2019 Answers to Aspire In

    21/44

    9. Develop the program calculateHeight, which computes the height that a rocketreaches in a given amount of time. If the rocket accelerates at a constant rate g, itreaches a speed of g t in t time units and a height of 1/2 v t where v is the

    speed at t.

    program:

    importjava.util.Scanner;

    publicclasscalculateHeight {

    /

    @paramargs

    /

    publicstaticvoid main(String[] args) { Scanner s=newScanner(System.in);System.out.println("Enter the time (in seconds) : "); double t=s.nextDouble();

    double v=9.8t;

  • 8/3/2019 Answers to Aspire In

    22/44

    double height=O.5vt; System.out.println("");

    System.out.println("Height reached (in meters) is : " + height);

    }

    }

    Output:

    Enter the time (in seconds) :

    3OO

  • 8/3/2019 Answers to Aspire In

    23/44

    Height reached (in meters) is : 441OOO.O

    -----------------------------------------------------------------------------

    1O. Develop a program that computes the distance a boat travels across a river,given the width of the river, the boats speed perpendicular to the river, and the

    rivers speed. Speed is distance/time, and the Pythagorean Theorem is c2 = a2 +b2.

    Program:

    importjava.util.Scanner;

    publicclassBoatDistance

    {

    /

  • 8/3/2019 Answers to Aspire In

    24/44

    @paramargs

    /

    publicstaticvoid main(String[] args)

    {

    Scanner s= newScanner(System.in);

    System.out.println("Enter the width of the river (in meters) : ");

    doublerw=s.nextDouble();

    System.out.println("Enter the rivers speed (in meter/sec) : ");

    doublers=s.nextDouble();

    System.out.println("Enter the boats speed (in meter/sec) : ");

    doublebs=s.nextDouble();

    double time=rw/bs; //time takes to travel from shore to shore straight by the boatdouble w2=timers; //distance due to down stream doublebd=Math.sQrt((rwrw)+(w2w2));

    System.out.println("");

    System.out.println("The distance travelled by boat (in meters) is : "+bd);

    }

    } Output:

  • 8/3/2019 Answers to Aspire In

    25/44

    Enter the width of the river (in meters) :

    15

    Enter the rivers speed (in meter/sec) :

    2OO

    Enter the boats speed (in meter/sec) :

    25O

    The distance travelled by boat (in meters) is : 19.2O93l2l12298546

    11. Develop a program that accepts an initial amount of money (called theprincipal), a simple annual interest rate, and a number of months will compute thebalance at the end of that time. Assume thatno additional deposits or withdrawalsare made and that a month is 1/12 of a year. Total interest is the product of theprincipal, the annual

    interest rate expressed as a decimal, and the number of years. Program:

    importjava.util.Scanner;

    publicclasscalculateBalance {

  • 8/3/2019 Answers to Aspire In

    26/44

    /

    @paramargs

    /

    publicstaticvoid main(String[] args)

    {

    Scanner s=newScanner(System.in); System.out.println("Enter the principalamount : "); double p=s.nextDouble();

    System.out.println("Enter the annual interest rate : ");

    double r=s.nextDouble(); System.out.println("Enter the no. of months : "); doublem=s.nextDouble(); doublesi=(p(m/12)r)/1OO;

    doublebal=p+si; System.out.println(""); System.out.print("Balance after " +(int)m);System.out.println(" month(s) is : "+bal);

    }

    } Output:

    Enter the principal amount :

    15OOO

    Enter the annual interest rate :

    12

    Enter the no. of months :

  • 8/3/2019 Answers to Aspire In

    27/44

    24

    Balance after 24 month(s) is : 186OO.O

    JAVA ASSISNMENT 2:

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

    returns the no of Clothes.

  • 8/3/2019 Answers to Aspire In

    28/44

    import java.util.; class fiashingMachine{Scanner input=newScanner(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 intacceptClothes(){System.out.println("Enter no of clothes: ");int no=input.nextInt();return no;}publicvoid switchOff () {System.out.println ("The lid is closed.");} public static voidmain(String[] args){fiashingMachinewm=new fiashingMachine();wm.switchOn();intnumOFClothes=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 subtractclass Calculation{public int add(inta,int b){return a+b;}public int subtract(inta,int

    b){if(a>b){return a-b;}else{return b-a;}}public int multiply(inta,int b){returnab;}public int divide(inta,int b){if(a>b){return a/b;}else{return b/a;}}}public classCalculator{public static void main(String []args){Calculation cal=newCalculation();int add=cal.add(5,1O);intsub=cal.subtract(5,1O);intmul=cal.multiply(5,1O);intdiv=cal.divide(5,1O);System.out.println(add);System.out.println(sub);System.out.pri

    ntln (mul);System.out.println(div);}}

    3. Create a class called Student which has the following methods:

    i. Average: which would accept marks of 3 examinations return whether thestudent haspassed or failed depending on whether he has scored an average above5O or not.ii. Inputname: which would accept the name of the student returns thename.

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

  • 8/3/2019 Answers to Aspire In

    29/44

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

    4).Create a Bank class with methods deposit withdraw. The deposit method wouldacceptattributes amount balance returns the new balance which is the sum of

    amount balance. Similarly, the withdraw method would accept the attributesamount

    balance returns the new balance balance amount if balance > = amount orreturn O

    otherwise.

    import javax.swing.;class Customer{intbal; Customer(intbal) {this.bal = bal;}intdeposit(intamt) {if (amt< O) {System.out.println("Invalid Amount");return 1;}bal =bal

    + amt;return O;} int withdraw(intamt) {if (bal

  • 8/3/2019 Answers to Aspire In

    30/44

    balance.");return 1;}if (amt< O) {System.out.println("Invalid Amount");return 1;}bal= bal - amt;return O;}void check(){JOptionPane.showMessageDialog(null,"Balance:" + Integer.toString(bal));} }publicclass Bank{public static void main(String[]args){Customer Cust=newCustomer(15OO);String st1=JOptionPane.showInputDialog(null,"Enter the amount to

    deposit:");intdep=Integer.parseInt(st1);

    int bal1=Cust.deposit(dep);Cust.check();Stringst2=JOptionPane.showInputDialog(null,"Enter the amount to withdraw:");intwith=Integer.parseInt(st2);intbal2=Cust.withdraw(with);Cust.check();}}

    int bal1=Cust.deposit(dep);Cust.check();Stringst2=JOptionPane.showInputDialog(null,"Enter the amount to withdraw:");intwith=Integer.parseInt(st2);intbal2=Cust.withdraw(with);Cust.check();}}

    5)Create an Employee class which has methods netSalary which would acceptsalary tax asarguments returns the netSalary which is tax deducted from the

    salary. Also it has a methodgrade which would accept the grade of the employee return grade.

    import java.util.;class Employee{static Scanner input=newScanner(System.in);public double netSalary(double salary, double taxrate){doubletax=salarytaxrate;doublenetpay=salary=tax;returnnetpay;}public static Stringgrade(

    ){System.out.print("Enter Srade: ");String grade=input.next();return grade;}public

    static void main(String[] args){Employee emp=newEmployee();System.out.print("Enter Salary: ");doublesal=input.nextDouble();System.out.print("Enter Tax in %: ");doubletaxrate=input.nextDouble()/1OO; String g=emp.grade();double

  • 8/3/2019 Answers to Aspire In

    31/44

    net=emp.netSalary(sal,taxrate);System.out.println("Net Salary is:"+net);System.out.println("Srade is: "+g);}}

    6. Create Product having following attributes: Product ID, Name, Category ID andUnitPrice. CreateElectricalProduct having the following additional attributes:VoltageRange and fiattage. Add a

    behavior to change the fiattage and price of the electrical product. Display the

    updatedElectricalProduct details. import java.util.;classProduct{intproductID;Stringname;intcategoryID;doubleprice;Product(intproductID,Strin gname,intcategoryID,double price){this.productID=productID;this.name=name;this.categoryID=categoryID;this.pric

    e=price;}}public class ElectricalProduct extendsProduct{intvoltageRange;intwattage;ElectricalProduct(intproductID,Stringname,intcateg oryID,doubleprice,intvoltageRange, intwattage){super(productID,name,categoryID,price);this.voltageRange=voltageRange;this.wattage=wattage;}

    COMMUNICATIOM ASSISNMENT:

    1. Identify the sounds in the following words. How many sounds can you find in eachword? Try and rewrite the words using the phonetic symbols.

    S.No. fiord Phonetic symbol No. of sounds

  • 8/3/2019 Answers to Aspire In

    32/44

    1) added & d a d 4

    2) project p r a d7 s k t l

    3) man m & n 3

    4) king k + y 3

    5) duck d a k 3

    6) come k a m 3 l) here h + r 3

    8) chocolate tf a k l a t 6

    9) comfortable k a m f a r t a b a l 111O) environmenta n v a j r a n m a n t 12

    11) technology t s k n a l + d7 i 9

    12) bear b s r 3

    13) computer k a m p j u t a r 9

    14) English + y g l + f 6

    15) Manager m & n a d7 a r l

    ---------------------------------------------------------------------------------------------------------

    2. fihat do you understand by the term schwa? Explain what you have understoodwith the help of examples.

  • 8/3/2019 Answers to Aspire In

    33/44

    Schwa is the most common sound in the English language. It occurs only inunstressed syllables and getting it correct helps spoken English to sound more

    natural and fluent. Any vowel letter can be pronounced as schwa and thepronunciation of a vowel letter can change depending on whether the syllable inwhich it occurs is stressed or not.

    The phonetic symbol for schwa is: /e/ Example:

    :- To survive the cold weather you have to make thorough preparations..

    The schwa sounds are marked in underlined

    ---------------------------------------------------------------------------------------------------------

    3. How many sounds do we have in English?

    There are 26 letters in the English alphabet but there are 44 sounds in the Englishlanguage. This means that the number of sounds in a word is not always the sameas the number of letters.

    The sounds are organized into the following different groups: Short vowels

    Long vowels

  • 8/3/2019 Answers to Aspire In

    34/44

    Diphthongs (double vowel sounds) Voiceless consonants

    Voiced consonants

    Other consonants

    ---------------------------------------------------------------------------------------------------------

    4. Put and Cut are spelt in a similar fashion but pronounced differently. Couldyou explain why?

    fiords rhyme when their sounds are the same from the last stressed vowel sound tothe end of the word.

    In single-syllable words its easy to find rhymes. Cat, sat, hat, and fat all rhyme.

    There are some non-rhyming words, specifically about words you would expect torhyme, but do not.

    Example: Cut and Put

    These two words have some similar spelling but they are pronounced in a differentway.

  • 8/3/2019 Answers to Aspire In

    35/44

    Cut is pronounced as /kxt/ Put is pronounced as /put/

    ---------------------------------------------------------------------------------------------------------

    5. Could you explain connected speech?

    fihen we speak naturally we do not pronounce a word, stop, and then say the nextword in the sentence. Fluent speech flows with a rhythm and the words bump into

    each other. To make speech flow smoothly the way we pronounce the end andbeginning of some words can change depending on the sounds at the beginningand end of those words.

    These changes are described as features of connected speech.

    Sounds twinning (gemination)

    fihen a word ends in a consonant sound and the following word begins with thesame consonant sound, we dont pronounce two sounds - both sounds arepronounced together as one.

    Im a bit tired

    fie have a lot to do

    Tell me what to say

    Shes slept for three hours

    Ive finished

  • 8/3/2019 Answers to Aspire In

    36/44

    Sounds disappear (elision)

    fihen the sounds /t/ or /d/ occur between two consonant sounds, they will oftendisappear completely from the pronunciation.

    Im going nex(t) week

    That was the wors(t) job I ever had! Jus(t) one person came to the party! I can(t)swim

    ---------------------------------------------------------------------------------------------------------

    6. fihy does fiho is sound as who(w)iz is connected speech?

    fihen one word ends with a vowel sound and the next word begins with a vowel,another sound, a /w/ or /j/ can be added depending on the particular sounds tomake a smooth transition. This is a type of linking (Vowel to Vowel Linking).

  • 8/3/2019 Answers to Aspire In

    37/44

    Here, in this example, 'who ends with vowel sound and 'is begins with a vowelsound. So, the sound /w/ is added to make a smooth transition.

    --------------------------------------------------------------------------------------------------------- l. fihydoes Visit us sound as Visi tas?

    fihen one word ends with a consonant sound and the next word begins with a vowelsound there is a smooth link between the two. This type is known as consonant tovowel linking.

    Here,

    'visit ends with consonant sound and 'us begins with a vowel sound. So, there is asmooth link between these two words

    ---------------------------------------------------------------------------------------------------------

    8. Based on the lessons you have accessed, write a brief note on what you haveunderstood about pronunciation in English.

    There are 26 letters in the English alphabet but there are many more sounds in theEnglish language. This means that the number of sounds in a word is not always thesame as the number of letters.

    The word CAT has three letters and three sounds but the word CATCH has fiveletters but still only three sounds.

    If we write these words using sound symbols, we can see exactly how many soundsthey have.

  • 8/3/2019 Answers to Aspire In

    38/44

    CAT is written /k & t/ CATCH is written /k & /

    ---------------------------------------------------------------------------------------------------------

    9. fihat is linking /r/?

    In standard British English the letter r after a vowel sound at the end of word isoften not pronounced. However, when the following word begins with a vowel the /r/sound is pronounced to make a smooth link. This is linking /r/.

    An Example is:

    ca(r) (no r in pronunciation)

    The car is here (r is pronounced and links to the following word)---------------------------------------------------------------------------------------------------------

    1O. fihat are voiceless and voiced sounds? Please explain this with the help ofexamples.

    In English, some consonants are voiced like /v/ and some are voiceless like /f/.

    You cant see the difference, you might be able to hear the difference, but you candefinitely feel the difference.

  • 8/3/2019 Answers to Aspire In

    39/44

    fihen making voiced sounds, throat vibrates

    fihen making voiceless sounds, its just air coming through the mouth.

    For Example,

    1. Van and Fan

    2. Pull and Bull

    3. Tin and Din

    The following sounds are usually voiceless:

    p t k f

    The following sounds are usually voiced b d g v

    BASICS OF PROSRAMMINS ASSISNMENT:

    1. firite a program to accept an array of names and a name and check whether thename

  • 8/3/2019 Answers to Aspire In

    40/44

    2. is present in the array. Return the count of occurrence. Use the following array asinput

    3. {Dave", Ann", Seorge", Sam", Ted", Sag", Saj", Agati", Mary", Sam",

    4. Ayan", Dev", Kity", Meery", Smith", Johnson", Bill", fiilliams", Jones",

    5. Brown", Davis", Miller", fiilson", Moore", Taylor, Anderson", Thomas",

    6. Jackson"}/

    l.

    8.

    9. import java.io.;

    1O. import java.util.StringTokenizer;

    11.

    12. public class CountOccurance

    13. {

    14. public static void main(String args[])throws Exception

    15. {

    16. InputStreamReader isr=new InputStreamReader(System.in);

    1l. BufferedReader br=new BufferedReader(isr);

    18.

    19. System.out.println("ENTER ARRAY OF NAMES:");

    2O. String arrNames=br.readLine();

    21.

    22. StringTokenizer st1=new StringTokenizer(arrNames);

    23.

    24. System.out.println("ENTER THE NAME TO BE SEARCHED:");

    25. String name=br.readLine();

    26.

    2l. int countNoOccurance=O;

  • 8/3/2019 Answers to Aspire In

    41/44

    28.

    29. while(st1.hasMoreTokens())

    3O. {

    31. if(name.eQualsIgnoreCase(st1.nextToken()))

    32. {

    33. countNoOccurance++;

    34.

    35. }

    36. }

    3l.

    38. System.out.println("THE NAME "+name+" HAS BEEN APPEARED"+countNoOccurance+" NO. OF

    2) write a program to calculate gcd of two numbers

    #include

    O2 using namespace std; O3

    O4 int gcd(int, int);

    O5 int SCD(int a, int B); O6

  • 8/3/2019 Answers to Aspire In

    42/44

    Ol int main()

    O8 {

    O9 int num1, num2;

    1O

    11 //get two numbers

    12 cout > num1 >> num2;

    14 while ((num1 < O) || (num2 < O))

    15 {

    16 cout > num1 >> num2;

    18 }

    19

    2O //Display SCD of two numbers.

    21 cout

  • 8/3/2019 Answers to Aspire In

    43/44

    33 else

    34 return gcd(y, x % y);

    35 }

    36

    3l

    38 // Iterative call to function

    39 int SCD(int a, int B)

    4O {

    41 while (1)

    42 {

    43 a = a % b;

    44 if ( a == O)

    45 {

    46 return b;

    4l }

    48 b = b % a;

    49 if (b == O)

    5O {

  • 8/3/2019 Answers to Aspire In

    44/44

    51 return a;

    52 }


Recommended