Topic :: Consumer





Consumer Interview Questions
Questions Answers Views Company eMail

What is consumer?s sovereignty means?

5 6799

How does the consumer benefit with VAT? (a) It removes tax on tax and thus reduces price-rise (b) It reduces the cost of production (c) Due to the abolition of the sales tax (d) Due to the exemption of small business from the tax within certain limits prescribed by the State

RIMC, State Bank Of India SBI,

2 8708

Consumer?s sovereignty means (a) Consumers are free to spend their income as they like (b) Consumers have the power to manage the economy (c) Consumer?s expenditures influence the allocation of resources (d) Consumer goods are free from government control

1 2782

A consumer is said to be in equilibrium, if: (A) he is able to fulfil his need with a given level of income (B) he is able to live in full comforts with a given level of income (C) he can fulfil his needs without consumption of certain items (D) He is able to locate new sources of income

ONGC, SSC,

1 13534

The merger between P & G and Gillette will create?? consumer goods company. 1 The World?s Second largest 2 The World?s largest 3 A reasonably big 4 None of the above is true

1 3249

ORA-24029: operation not allowed on a single-consumer queue

1 3307

ORA-25231: cannot dequeue because CONSUMER_NAME not specified

1 5609

ORA-25243: CONSUMER_NAME cannot be specified when dequeuing from exception queue string.string

1 3118

ORA-25256: consumer cannot be specified with a single-consumer queue or an exception queue

1 2772

ORA-25257: consumer must be specified with a multi-consumer queue

1 3791

ORA-26699: STREAMS message consumer string already exists

1 2452

ORA-29366: invalid CONSUMER_GROUP argument specified

1 2268

ORA-29368: consumer group string does not exist

1 6272

ORA-29369: invalid method name string specified for consumer group string

1 2164

ORA-29376: number of consumer groups string in top-plan string exceeds string

1 2405




Un-Answered Questions { Consumer }

How would you value a biotech company as opposed to a consumer products company?

1880


In a C# class we have a SortedList member m_addinProjects we want to provide an iterator to allow the consumer of this class access to the items in the collection. Please provide an iterator method for the AnalyzeAddinsDLL class below and an example of how it would be used. namespace AnalyzeAddinsDLL { public class AllAddInProjects { private SortedList m_addinProjects; public AllAddInProjects() { m_addinProjects = new SortedList(); } } }

1822


HANDLING OF ALL FRONT OFFICE QUERIES PERTAINING TO CONSUMER ACCOUNTS AND INTERACTION

2059


what is difference between consumer based accounting and purchasing based accounting and how to assign the difference to profitability analysis.

1676


what is the criterion for selecting vector group of Transformers ? i mean how to decide vector group of Generator transformer, substation trasformer and transformer at consumer end

1781






plzzzzzzzzz xplain this code import java.awt.*; import java.awt.event.*; //import java.awt.MenuItem.*; public class MenuForm extends Frame implements ActionListener { MenuBar mb=new MenuBar(); Menu m1=new Menu("Master"); Menu m2 =new Menu("Transactions"); Menu m3=new Menu("Queries"); Menu m4=new Menu("Reports"); Menu m5=new Menu("Daily/Weekly"); Menu m6=new Menu("Housekeeping"); Menu m7=new Menu("About"); Menu m8=new Menu("Utilities/Tools"); Menu m9=new Menu("exit"); MenuItem m11=new MenuItem("consumer master"); MenuItem m12=new MenuItem(""); MenuItem m13=new MenuItem(""); MenuItem m21=new MenuItem("New Connection"); MenuItem m22=new MenuItem("Refill Booking"); MenuItem m23=new MenuItem("Shop Delivery"); MenuItem m51=new MenuItem("Mrk Dlry"); MenuItem m91=new MenuItem("Quit"); /*MenuItem m131=new MenuItem(" "); MenuItem m132=new MenuItem(" "); MenuItem m134=new MenuItem(" ");*/ Font f=new Font("TimesRoman",Font.BOLD,16); Frame f1; public static void main(String args[]) { new MenuForm().setVisible(true); } public MenuForm() { super("Gas Agency Main Menu"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); setMenuBar(mb); /*m1.setFont(new Font("TimesRoman", Font.BOLD,16)); m2.setFont(new Font("TimesRoman", Font.BOLD,16)); m3.setFont(new Font("TimesRoman", Font.BOLD,16));*/ mb.add(m1); mb.add(m2); mb.add(m3); mb.add(m4); mb.add(m5); mb.add(m6); mb.add(m7); mb.add(m8); mb.add(m9); m1.add(m11); m1.add(m12); m1.add(m13); m2.add(m21); m2.add(m22); m2.add(m23); m5.add(m51); m9.add(m91); //m3.add(m31); /*m13.setEnabled(false); m13.add(m131); m13.add(m132); m13.add(m133); m13.add(m134); m13.add(m135);*/ setVisible(true); /*m11.addActionListener(this); m12.addActionListener(this); m13.addActionListener(this); m2.addActionListener(this); m3.addActionListener(this);*/ m21.addActionListener(this); m22.addActionListener(this); m23.addActionListener(this); /*m31.addActionListener(this); m131.addActionListener(this); m132.addActionListener(this); m133.addActionListener(this); m134.addActionListener(this); m135.addActionListener(this);*/ m51.addActionListener(this); m91.addActionListener(this); } public void actionPerformed(ActionEvent e) { /*if(e.getSource()==m11) { } if(e.getSource()==m12) { } if( (e.getSource()==m131) || (e.getSource() ==m132) || (e.getSource()==m133) || (e.getSource()==m134) || (e.getSource()==m135) ) { }*/ if(e.getSource()==m21) { NewConnection nc=new NewConnection (); nc.setVisible(true); this.dispose(); } if(e.getSource()==m22) { RefillBooking rb=new RefillBooking (); rb.setVisible(true); this.dispose(); } if(e.getSource()==m23) { ShopDelivery sd=new ShopDelivery(); sd.setVisible(true); this.dispose(); } if(e.getSource()==m51) { MarkDelivery mrk=new MarkDelivery(); mrk.setVisible (true); this.dispose(); } if(e.getSource()==m91) { this.dispose(); System.exit(0); } } }

1675


plzzzzzzzzz xplain this code import java.awt.*; import java.awt.event.*; import java.awt.MenuItem.*; import java.sql.*; import java.util.Date; import sun.jdbc.odbc.*; import java.io.*; public class RefillBooking extends Frame implements ActionListener { Label l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13; Button exit,save,next,top,prev,botm,ad,show; TextField txtBookingNo,txtConsNo,txtBookingDt,txtConsName,txtAddr1,txt PhNo,txtBookDtold,txtPrintDt,txtCMemoNo,txtOldDlryDt,adr2,ad r3,tot,stnry,rmrk; Date date=new Date(); String ConsName; String Addr1; public static void main(String sr[]) { new RefillBooking().setVisible(true); } public RefillBooking() { super("Refill Booking"); Statement stmt; ResultSet rs; //PreparedStatement pst; Connection con; try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:Agency"); if (con!=null); System.out.println ("connected"); stmt =con.createStatement (); } catch(Exception e1) { System.out.println (e1); } setSize(1280,800); setBackground(Color.lightGray); setLayout(null); l1=new Label("Booking No"); l1.setBounds(260,60,90,30); l1.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l1.setAlignment(Label.CENTER); add(l1); l2=new Label("CONSMR NO"); l2.setBounds(30,60,90,30); l2.setFont(new Font("TimesRoman",Font.PLAIN,15)); l2.setAlignment(Label.CENTER); add(l2); l3=new Label("Book DATE (mm/dd/yyyy)"); l3.setBounds(520,60,190,30); l3.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l3.setAlignment(Label.CENTER); add(l3); l4=new Label("NAME"); l4.setBounds(30,150,45,30); l4.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l4.setAlignment(Label.CENTER); add(l4); l5=new Label("ADRS"); l5.setBounds(30,220,45,30); l5.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l5.setAlignment(Label.CENTER); add(l5); l6=new Label("PH NO"); l6.setBounds(500,150,45,30); l6.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l6.setAlignment(Label.CENTER); add(l6); l7=new Label("OldBkDt"); l7.setBounds(30,390,55,30); l7.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l7.setAlignment(Label.CENTER); add(l7); l8=new Label("Print Date"); l8.setBounds(320,390,65,30); l8.setFont(new Font("TimesRoman",Font.PLAIN,15)); l8.setAlignment(Label.CENTER); add(l8); l9=new Label("CMemo No"); l9.setBounds(700,390,65,30); l9.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l9.setAlignment(Label.CENTER); add(l9); l10=new Label("Del Date"); l10.setBounds(550,390,55,30); l10.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l10.setAlignment(Label.CENTER); add(l10); l13=new Label("REMARKS"); l13.setBounds (30,630,85,30); l13.setFont(new Font ("TimesRoman",Font.PLAIN,15)); l13.setAlignment (Label.CENTER); add(l13); txtBookingNo=new TextField(); txtBookingNo.setBounds(375,60,80,30); txtBookingNo.setBackground(Color.white); add(txtBookingNo); txtConsNo=new TextField(); txtConsNo.setBounds(130,60,80,30); txtConsNo.setBackground(Color.white); add(txtConsNo); txtBookingDt=new TextField(); txtBookingDt.setBounds(750,60,80,30); txtBookingDt.setBackground(Color.white); add(txtBookingDt); txtConsName=new TextField(); txtConsName.setBounds(100,150,200,30); txtConsName.setBackground(Color.white); add(txtConsName); txtAddr1=new TextField(); txtAddr1.setBounds(100,220,350,30); txtAddr1.setBackground(Color.white); add(txtAddr1); adr2=new TextField(); adr2.setBounds(100,250,350,30); adr2.setBackground(Color.white); add(adr2); adr3=new TextField(); adr3.setBounds(100,280,350,30); adr3.setBackground(Color.white); add(adr3); txtPhNo=new TextField(); txtPhNo.setBounds(570,150,150,30); txtPhNo.setBackground(Color.white); add(txtPhNo); txtBookDtold=new TextField(); txtBookDtold.setBounds(30,440,60,30); txtBookDtold.setBackground(Color.white); add(txtBookDtold); txtPrintDt=new TextField(); txtPrintDt.setBounds(320,440,60,30); txtPrintDt.setBackground(Color.white); add(txtPrintDt); txtCMemoNo=new TextField(); txtCMemoNo.setBounds(700,440,60,30); txtCMemoNo.setBackground(Color.white); add(txtCMemoNo); txtOldDlryDt=new TextField(); txtOldDlryDt.setBounds(550,440,60,30); txtOldDlryDt.setBackground(Color.white); add(txtOldDlryDt); rmrk=new TextField(); rmrk.setBounds(140,630,600,30); rmrk.setBackground(Color.white); add(rmrk); exit=new Button("EXIT"); exit.setBackground(Color.orange); exit.setBounds(760,700,40,40); exit.addActionListener(this); add(exit); save=new Button("SAVE"); save.setBackground(Color.orange); save.setBounds(715,700,40,40); save.addActionListener(this); add(save); next=new Button("NEXT"); next.setBackground(Color.orange); next.setBounds(90,700,40,40); next.addActionListener(this); add(next); top=new Button("TOP"); top.setBackground(Color.orange); top.setBounds(0,700,40,40); top.addActionListener(this); add(top); prev=new Button("PREV"); prev.setBackground(Color.orange); prev.setBounds(45,700,40,40); prev.addActionListener(this); add(prev); botm=new Button("BOTM"); botm.setBackground (Color.orange); botm.setBounds (135,700,40,40); botm.addActionListener (this); add(botm); ad=new Button("ADD"); ad.setBackground (Color.orange); ad.setBounds (300,700,40,40); ad.addActionListener (this); add(ad); show=new Button("SHOW"); show.setBackground (Color.orange); show.setBounds (345,700,40,40); show.addActionListener (this); add(show); } public void actionPerformed(ActionEvent e) { if(e.getSource()==exit) { this.dispose(); System.exit(0); } if(e.getSource()==save) { int bkflag=1; try { Connection con=DriverManager.getConnection("jdbc:odbc:Agency"); PreparedStatement pst=con.prepareStatement("INSERT INTO RefillBooking VALUES (?,?,?,?)"); pst.setInt (1,Integer.parseInt(txtBookingNo.getText())); pst.setInt (2,Integer.parseInt(txtConsNo.getText())); pst.setString (3,txtBookingDt.getText()); pst.setInt(4,bkflag); /* pst.setString (4,txtConsName.getText()); pst.setString (6,txtAddr1.getText()); pst.setString(7,adr2.getText ()); pst.setString(8,adr3.getText ()); pst.setInt(9,Integer.parseInt (txtCylQty.getText())); pst.setInt (10,Integer.parseInt(txtCylDep.getText())); pst.setInt (11,Integer.parseInt(txtRegQty.getText())); pst.setInt (12,Integer.parseInt(txtRegDep.getText())); pst.setInt (13,Integer.parseInt(tot.getText())); pst.setInt (14,Integer.parseInt(stnry.getText())); pst.setString(15,rmrk.getText ());*/ pst.executeUpdate(); con.close(); } catch(Exception e2) {System.out.println(e2);} } if(e.getSource()==show) { System.out.println("entered if body"); try { //to bring consumer's details Connection con2=DriverManager.getConnection("jdbc:odbc:Agency"); int consumer=Integer.parseInt (txtConsNo.getText()); PreparedStatement ps2=con2.prepareStatement("SELECT * FROM NewCon WHERE Cons_No=?"); ps2.setInt(1,consumer); ResultSet rs2= ps2.executeQuery(); while(rs2.next()) { System.out.print ("entered while"+rs2.getString(2)); txtConsName.setText (rs2.getString("Cons_Name")); txtAddr1.setText (rs2.getString("Adress1")); txtPhNo.setText (""+rs2.getInt("Ph_No")); adr2.setText (rs2.getString("Adress2")); adr3.setText (rs2.getString("Adress3")); rmrk.setText(""); } //Statement stmt3=con2.createStatement(); //ResultSet rs3=stmt3.executeQuery("SELECT CMemoNo,CMemo_Date,DeliveryDate FROM CashMemo where Cons_No="+consumer); con2.close(); } catch(Exception e2) {System.out.println(e2);} } if(e.getSource()==ad) { int newbkno=0; System.out.println("entered if body"); try { //to clear textboxes txtConsName.setText(""); txtAddr1.setText(""); txtBookingNo.setText(""); txtPhNo.setText(""); adr2.setText(""); adr3.setText(""); rmrk.setText(""); txtConsNo.setText(""); txtBookingDt.setText("" + date); txtBookDtold.setText(""); txtPrintDt.setText(""); txtCMemoNo.setText(""); txtOldDlryDt.setText(""); //to generate bookin no System.out.println("entered the try:"); Connection con1=DriverManager.getConnection("jdbc:odbc:Agency"); Statement stmt1=con1.createStatement(); ResultSet rs1=stmt1.executeQuery ("SELECT BookingNo FROM RefillBooking "); while(rs1.next()) { txtBookingNo.setText (""+rs1.getInt(1)); } newbkno=Integer.parseInt (txtBookingNo.getText()); System.out.println(newbkno); newbkno=newbkno+1; txtBookingNo.setText(""+newbkno); } catch(Exception e4){System.out.println(e4);} } } }

1897


Question 1 [8] Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram. 6 Question 2 [10] The following program reads data (details of students) from a file named students.txt and converts it into e-mail addresses. The results are written to a file named studentemail.txt. students.txt consists of a number of lines, each containing the data of a student in colon delimited format: Last Name:First Name:Student Number Each input record is converted to an e-mail address and written to studentemail.txt in the following format: the first character of the last name + the first character of the first name + the last four digits of the student number + “@myunisa.ac.za” import java.io.*; public class EmailConverter { public static void main(String[] args) throws IOException { BufferedReader input = new BufferedReader(new FileReader ("students.txt")); PrintWriter output = new PrintWriter(new FileWriter ("studentemail.txt")); String line = input.readLine(); while (line != null) { // Extract the information for each student String[] items = line.split(":"); // Generate the email address String email = "" + items[0].charAt(0) + items[1].charAt(0) + items[2].substring(4,8) + "@myunisa.ac.za"; email = email.toLowerCase(); // Output output.println(email); line = input.readLine(); } input.close(); output.close(); } } Rewrite the class so that it handles possible errors that may occur. In particular, it should do the following: • It should catch at least three appropriate exceptions that might occur, and display suitable messages. • At this stage, the program will not run correctly if there is an empty line in the input file. Change the program so that if an empty line is encountered, an exception is thrown and the empty line is ignored. This exception should be handled with the display of a suitable error message. • Before the e-mail address is added to the output file, check if the student number has 8 digits. If not, throw an InvalidFormatException (which the program should not handle itself). COS2144/102 7 Question 3 [12] 3.1 Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2) 3.2 Consider the following class: public class Point { protected int x, y; public Point(int xx, int yy) { x = xx; y = yy; } public Point() { this(0, 0); } public int getx() { return x; } public int gety() { return y; } public String toString() { return "("+x+", "+y+")"; } } Say you wanted to define a rectangle class that stored its top left corner and its height and width as fields. 3.2.1 Why would it be wrong to make Rectangle inherit from Point (where in fact it would inherit the x and y coordinates for its top left corner and you could just add the height and width as additional fields)? (1) 8 Now consider the following skeleton of the Rectangle class: public class Rectangle { private Point topLeft; private int height, width; public Rectangle(Point tl, int h, int w) { topLeft = tl; height = h; width = w; } public Rectangle() { this(new Point(), 0, 0); } // methods come here } 3.2.2 Explain the no-argument constructor of the Rectangle class given above. 3.2.3 Write methods for the Rectangle class to do the following: • a toString() method that returns a string of the format "top left = (x, y); height = h; width = w " where x, y, h and w are the appropriate integer values. • an above() method that tests whether one rectangle is completely above another (i.e. all y values of the one rectangle are greater than all y values of the other). For example, with the following declarations Rectangle r1 = new Rectangle(); Rectangle r2 = new Rectangle(new Point(2,2), 1, 4); the expression r2.above(r1) should give true, and r2.above (r2) should give false. (You can assume that the height of a rectangle is never negative.) (2) (5) Question 4 [8] 4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (4) COS2144/102 9 Question 5 [15] Consider the following classes, illustrating the Strategy design pattern: import java.awt.*; abstract class Text { protected TextApplet tA; protected Text(TextApplet tApplet) { tA = tApplet; } abstract public void draw(Graphics g); } class PlainText extends Text { protected PlainText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Sans-serif", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } class CodeText extends Text { protected CodeText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Monospaced", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } public class TextApplet extends java.applet.Applet { protected Text text; protected String textVal; protected Color color; public String getText() { return textVal; } public Color getColor() { return color; } public void init() { textVal = getParameter("text"); String textStyle = getParameter("style"); String textColor = getParameter("color"); if (textStyle == "code") text = new CodeText(this); else text = new PlainText(this); if (textColor == "red") color = Color.RED; else if (textColor == "blue") color = Color.BLUE; else color = Color.BLACK; } public void paint(Graphics g) { text.draw(g); 10 } } The Text class is more complicated than it should be (there is too much coupling between the Text and TextApplet classes). By getting rid of the reference to a TextApplet object in the Text class and setting the colour in the paint() method, one could turn the Text class into an interface and simplify the strategy classes considerably. 5.1 Rewrite the Text and PlainText classes to do what is described above. (6) 5.2 Explain the consequent changes that are necessary to the TextApplet class. (4) 5.3 Write an additional strategy class called FancyText (to go with your simplified strategy classes) to allow fancy text to be displayed for the value "fancy" provided for the style parameter. It should use the font Font ("Serif", Font.ITALIC, 12). (3) 5.4 Explain what changes are necessary to the TextApplet class for this. (2) Question 6 [9] 6.1 In what situations (in general) would you use a TreeMap? (3) 6.2 In what situations (in general) would you use a HashSet to store a collection of values? (3) 6.3 Name three software design patterns (besides the Strategy pattern) that are covered in the syllabus of COS2144. (3) Question 7 [8] Consider the following class and answer the questions below it: public class StackWithGuard extends Stack { public StackWithGuard(int size) { super(size); } synchronized public boolean isEmpty() { return super.isEmpty(); } synchronized public boolean isFull() { return super.isFull(); } synchronized public int getSize() { return super.getSize(); } synchronized public void push(Object obj) { try { while (isFull()) { wait(); } } catch (InterruptedException e) {} super.push(obj); COS2144/102 11 notify(); } synchronized public Object pop() { try { while (isEmpty()) { wait(); } } catch (InterruptedException e) {} Object result = super.pop(); notify(); return result; } public static void main(String args[]) { StackWithGuard stack = new StackWithGuard(5); new Producer(stack, 15).start(); new Consumer(stack, 15).start(); } } Note: The Stack class is provided in the Appendix. Note also: The following questions all refer to the pop() method of the StackWithGuard class given above. 7.1 What does the synchronized keyword ensure for this method? (2) 7.2 Why is a while loop used to test whether the stack is empty? In other words, why wouldn't the following if statement be sufficient? if (isEmpty()) { wait(); } (2) 7.3 Why is the result of popping (provided by the inherited pop() method) stored in a temporary variable? In other words, why wouldn't the following statement be sufficient? return super.pop(); (2) 7.4 Why is the while loop placed in a try-catch structure? (2) Appendix The LinkedQueue class: public class LinkedQueue implements Queue { private Node first, last; private int count; public LinkedQueue() { first = last = null; count =0; } public int size() { return count; } public boolean isEmpty() { return (count == 0); 12 } public void enqueue(Object o) { Node node = new Node(); node.element = o; node.next = null; node.prev = last; if (last != null){ last.next = node; } else { last = first = node; } last = node; count++; } public void dequeue() { if ((first!= null) & (first.next!=null)) { first = first.next; first.prev = null; count--; } else { first = last = null; count--; } } public Object front() { return first; } } class Node { Object element; Node next, prev; } The Stack class: public class Stack { protected Object rep[]; protected int top = -1; protected int size = 0; protected int count = 0; public Stack(int size) { if (size > 0) { this.size = size; rep = new Object[size]; } } public boolean isFull() { return (count == size); } public boolean isEmpty() { return (count == 0); } public int getSize() { return size; } public void push(Object e) { if (e != null && !isFull()) { COS2144/102 13 top++; rep[top] = e; count ++; } } public Object pop() { Object result = null; if (!isEmpty()) { result = rep[top]; top--; count--; } return result; } }

2297


What size cable (based on voltage drop) is required to supply a 40 A three phase boiler if the wiring system is 75V single insulated cables installed in non-metallic rigid conduit 56m from the main switchboard? Voltage drop in the consumer's mains is 8V.

1496


Whether excise can be be levied from consumer on power consumption.

1301


reasons for popularity of consumer credit in india

1380


1. Nine students in a science class separately weighed a small object on the same scale. The weights (in grams) recorded by each student are shown below. 6.2 6.0 6.0 15.3 6.1 6.3 6.2 6.329 6.2 The students want to determine as accurately as they can the actual weight of this object. Of the following methods, which would you recommend they use? a. Use the most common number, which is 6.2 b. Use the 6.329 since it includes more decimal places. c. Add up the 9 numbers and divide by 9. d. Throw out the 15.3, add up the other 8 numbers and divide by 8. 2. The following message is printed on a bottle of prescription medication: WARNING: For application to skin areas there is a 15% chance of developing a rash. If a rash develops, consult your physician. Which of the following is the best interpretation of this warning? a. Don’t use the medication on your skin-- there’s a good chance of developing a rash. b. For application to the skin, apply only 15% of the recommended dose. c. If a rash develops, it will probably involve only 15% of the skin. d. About 15 of 100 people who use this medication develop a rash. e. There is hardly a chance of getting a rash using this medication. 3. The Springfield Meteorological Center wanted to determine the accuracy of their weather forecasts. They searched their records for those days when forecasts had reported a 70% chance of rain. They compared their forecasts to records of whether or not it actually rained on those particular days. The forecast of 70% chance of rain can be considered very accurate if it rained on: a. 95%-100% of those days. b. 85%-94% of those days. c. 75%-84% of those days. d. 65%-74% of those days. e. 55%-64% of those days. 4. A teacher wants to change the seating arrangement in her class in the hopes that it will increase the number of comments her students make. She first decides to see how many comments students make with the current seating arrangement. A record of the number of comments made by her 8 students during one class period is shown below. ____ _Student Initials _ A.A R.F. A.G. J.G. C.K. N.K. J.L. A.W. Number of Comments 0 5 2 22 3 2 1 2 . She wants to summarize this data by computing the typical number of comments made that day. Of the following methods, which would you recommend she use? a. Use the most common number, which is 2. b. Add up the 8 numbers and divide by 8. c. Throw out the 22, and then add up the other 7 and divide by 7. d. Throw out the 0, add up the other 7 numbers and divide by 7. For items 5-6 A new medication is being tested to determine its effectiveness in the treatment of eczema, an inflammatory condition of the skin. Thirty patients with eczema were selected to participate in the study. The patients were randomly divided into two groups. Twenty patients in an experimental group received the medication, while ten patients in a control group received no medication. The results after two months are shown below. Experimental group (medication) Control group (no medication) Improved 8 Improved 2 No improvement 12 No Improvement 8 5. Based on the data, I think the medication was: a. somewhat effective b. basically ineffective 6. If you chose option a, select the one If you chose option b, select the explanation below that best describes one explanation below that best your reasoning. describes your reasoning. a. 40% of the people (8/20) in the a. In the control group, experimental group improved. two people improved even without medication. b. 8 people improved in the experimental b. In the experimental group, group while only 2 improved in the more people didn’t get control group better than did (12 vs. 8). c. In the experimental group, the number c. The difference between of people who improved is only 4 less the numbers who than the number who didn’t improve improved and didn’t (12-8), while in the control group the improve is about the difference is 6 (8-2). same in each group (4 vs. 6). d. 40% of the patients in the d. Only 40% of the patients in experimental group improved (8/20), the experimental group while only 20% improved in the improved (8/20), while 20%. control group (2/10). improved in the control group (2/10). Items 7-9 Listed below are several possible reasons one might question the results of the experiment described above. Mark A for every reason you agree with. A = Agree B = Disagree 7. It’s not possible to compare the two groups because there are different numbers of patients in each group. 8. With a sample size of 30, it’s possible that random assignment of patients may have, just by chance, placed the most severe cases in one of the groups. 9. I’m not given enough information about how doctors decided whether or not patients improved. Doctors may have been biased in their judgment. 10. Two containers, labeled A and B, are filled with red and blue marbles in the following quantities. Container Red Blue A 6 4 B 60 40 Each container is shaken vigorously. After choosing one of the containers, you will reach in, without looking, draw out a marble. If the marble is blue, you win $50. Which container gives you the best chance of drawing a blue marble? a. Container A (with 6 red and 4 blue) b. Container B (with 60 red and 40 Blue) c. Equal chances from each container. 11. Which of the following sequences is most likely to result from flipping a fair coin five times? (H=Heads, T=Tails) a. H H H T T b. T H H T H c. T H T T T d. H T H T H e. All four are equally likely Items 12-15 Select one or more explanations for possible coin-flipping outcomes. A = Agree B = Disagree 12. Since coin flipping is random, the coin ought to alternate frequently between landing heads and tails. 13. If you repeatedly flipped a coin five times, each of the sequences would occur about as often as any sequence. 14. If you get a couple of heads in a row, the probability of tails on the next flip increases. 15. Every sequence of five flips has exactly the same probability of occurring. 17. Listed below are the same sequences of H’s and T’s that were listed in Item 11. Which of the sequences is least likely to result from flipping a coin 5 times? a. H H H T T b. T H H T H c. T H T T T d. H T H T H e. All four sequences are equally unlikely Items 17-22 A marketing research company was asked to determine how much money teenagers (ages 13-19) spend on recorded music (cassette tapes, CD’s, and DVD’s). The company randomly selected 80 malls located around the country. A field researcher stood in a central location in the mall and passers-by who appeared to be the approximate age were asked to fill out the questionnaire. A total of 2,050 questionnaires were completed by teenagers. On the basis of this survey, the research company reported that the average teenager in this country spends $155 each year on recorded music. Listed below are several statements concerning the survey. Mark A for each statement you agree with. Mark B for each statement you disagree with. A = Agree B = Disagree 17. The average is based on teenagers’ estimates of what they spend and therefore could be quite different from what teenagers actually spend. 18. They should have done the survey at more than 80 malls if they wanted an average based on teenagers throughout the country. 19. The sample of 2,050 teenagers is too small to permit drawing a conclusion about the entire country. 20. They should have asked teenagers coming out of music stores. 21. The average could be a poor estimate of the spending of all teenagers given that teenagers were not randomly chosen to fill out the questionnaire. 22. The average could be a poor estimate of the spending of all teenagers given that only teenagers in malls were sampled. 23. Five faces of a fair die are painted black, and one face is painted white. The die is rolled six times. Which of the following results is more likely? a. Black side up on five of the rolls; white side up on the other roll b. Black side up on all six rolls c. a and b are equally likely 24. Half of all newborn children are girls and half are boys. Hospital A records an average of 50 births a day. Hospital B records an average of 10 births a day. On a particular day, which hospital is more likely to record 80% or more female births. a. Hospital A (with 50 births a day) b. Hospital B (with 10 births a day) c. The two hospitals are equally likely to record such an event. 25. The Caldwells want to buy a new car, and they have narrowed their choices to a Buick or an Oldsmobile. They first consulted an issue of Consumer Reports, which compared rates of repairs for various cars. Records or repairs done on 400 cars of each type showed somewhat fewer mechanical problems with the Buick than the Oldsmobile. The Caldwells then talked to three friends, two Oldsmobile owners, and one former Buick Owner. Both Oldsmobile owners reported having a few mechanical problems, but nothing major. The Buick owner, however, exploded when asked how he liked his car: “First the fuel injection went out-- $250 bucks. Next I started having trouble with the rear end and had to replace it. I finally decided to sell it after the transmission went. I’d never buy another Buick.” The Caldwells want to buy the car that is less likely to require major repair work. Given what they currently know, which car would you recommend that they buy? a. I would recommend they buy the Oldsmobile, primarily because of all the trouble their friend had with his Buick. Since they haven’t heard similar horror stories about an Oldsmobile, they should go with it. b. I would recommend they buy the Buick in spite of their friend’s bad experience. This is just one case, while the information reported in Consumer Report is based on many cases. And according to the data, the Buick is somewhat less likely to require repairs. c. I would tell them that it didn’t matter which car they bought. Even though one of the models might be more likely than the other to require repairs, they could still, just by chance, get stuck with a particular car that would need a lot of repairs. They may as well toss a coin to decide. 26. Forty college students participated in a study of the effect of sleep on test scores. Twenty of the students volunteered to stay up all night studying the night before the test (no sleep group). The other 20 students (the control group) went to bed by 11:00 p.m. on the evening of the test. The test scores for each group are shown in the graphs below. Each dot on the graph represents a particular student’s score. For example, the two dots above 80 in the bottom graph indicate that two students in the sleep group scored 80 on the test. . . . . . . . . . . . . . . . . . . . . 30 40 50 60 70 80 90 100 Test Scores: No- Sleep Group . . . . . . . . . . . . . . . . . . . . 30 40 50 60 70 80 90 100 Test Scores: Sleep Group Examine the two graphs carefully. Then choose from the 6 possible conclusions listed below the one you most agree with. a. The no-sleep group did better because none of these students scored below 40 and, a student in this group achieved the highest score. b. The no-sleep group did better because its average appears to be a little higher than the average of the sleep group. c. There is no difference between the two groups because there is considerable overlap in the scores of the two groups. d. There is no difference between the two groups because the difference between their averages is small compared to the amount of variation in the scores. e. The sleep group did better because its average appears to be a little higher than the average of the no sleep group. Items 27-31 For one month, 500 elementary students kept a daily record of the hours spent watching television. The average number of hours per week spent watching television was 28. The researchers conducting the study also obtained report cards for each of the students. They found that the students who did well in school spent less time watching television than those students who did poorly. Listed below are several possible statements concerning the results of this research. Mark A for each statement you agree with. A = Agree B = Disagree 27. The sample of 500 is too small to permit drawing conclusions. 28. If a student decreases the amount of time spent watching television, his or her performance in school would improve. 29. Even though students who did well watched less television, this doesn’t necessarily mean that watching television hurts school performance. 30. One month is not a long enough period of time to estimate how many hours the students really spend watching television. 31. The research demonstrates that watching television causes poorer performance in school. Items 32-37 The school committee of a small town wanted to determine the average number of children per household in their town. They divided the total number of children in the town by 50, the total number of households. Indicate which statements must be true if the average number of children per household is exactly 2.2. Mark A for the statements you agree with and B for the statements you disagree with. A = Agree B = Disagree 32. Half of the households in the town have more than 2 children. 33. More households in the town have 3 children than have 2 children. 34. There are 110 children in the town. 35. There are 2.2 children in the town for every adult. 36. The most common number of children in a household is 2. 37. More households in the town have 2 children than have 3 children. 38. When two dice are simultaneously thrown it is possible that one of the following two results occurs: Result 1: A 5 and a 6 are obtained. Result 2: A 5 is obtained twice. Select the response that you agree with most: a. The chance of obtaining each of these results is equal. b. There is more chance of obtaining Result 1. c. There is more chance of obtaining Result 2. d. It is impossible to give an answer. 39. When three dice are simultaneously thrown, which of the following results is MOST LIKELY to be obtained? a. Result 1: A 5, a 3 and a 6 b. Result 2: A 5 three times c. Result 3: A 5 twice and a 3 d. All three results are equally likely 40. When three dice are simultaneously thrown, which of these three results is LEAST LIKELY to be obtained? a. Result 1: A 5, a 3 and a 6 b. Result 2: A 5 three times c. Result 3: A 5 twice and a 3 d. All three results are equally unlikely

3851


standard form of contract is a protection available to consumer from explitative sweeping clauses?explain.

1645


hdn Systems Pvt. Ltd., manufactures a consumer durable which passes through two processes M and N. From the following details prepare necessary process ledger accounts bringing out clearly the cost of the product at each stage. Process ‘M’ Process ‘N’ Materials (Rs.) 30,000 3,000 Labour (Rs.) 10,000 12,000 Overheads (Rs.) 7,000 8,600 Input (units) 20,000 17,500 Normal loss 10% 4% Scrap value of loss (per unit) Re. 1.00 Rs. 2.00 There is no opening or closing W-I-P or stock at processes. Final output from the process ‘N’ was 17,000 units

1682


what are points to be kept in mind while purchasing consumers for CSD?

1478