Analyse the following highly simplified procedure: Ask: “What type of ticket do you require, single or return?” IF the customer wants ‘return’ Ask: “What rate, Standard or Cheap-day?” IF the customer replies ‘Cheap-day’ Say: “That will be £11:20” ELSE Say: “That will be £19:50” ENDIF ELSE Say: “That will be £9:75” ENDIF Now decide the minimum number of tests that are needed to ensure that all the questions have been asked, all combinations have occurred and all replies given a)3 b)4 c)5 d)6 Please explain answer of this Question. Thanks
2 9082why the closing stock is not considered in drawing trail balance.... Are there any other items like the above
2458The 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)
19583.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)
2993on fellowing which assest shouldn't be depriciate?a) furniture , b)television c)goodwill d)printer
2 4356Write a cron entry for the following scenario:- At 10:30 AM for every Sunday of every 1st month of a quarter.
7 13681Give an algorithm for the following problem and determine its time complexity. Given a list of n distinct positive integers, partition the list into two sublists, each of size n/2, such that the difference between the sums of the integers in the two sublists is maximized. You may assume that n is a multiple of 2 (i.e. n is even).
1 8481How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }
2392i woild like to know the configuration for the following scenario . The source of supply material "x"is only vendor, the same acts as the local vendor and the import vendor. how it is to be configured and what are its GR/IR effects
1 6762Write a C Program to display the following menu: Menu 1. Display 2. Copy 3. Append 4. Exit Accept the choice (1-4) from the user, and perform the following tasks: Choice 1: Accept a file name from the user and display the file on screen Choice 2: Accept two file names, and copy first file to the second Choice 3: Accept two file names, and append second file to the first file Choice 4: Terminate the program
1 12099Assume a DC motor with the following parameters : Motor torque control = 0.0848 Nm/amperes Back EMF control = 0.0848 Volts/(rad/s) Armature resistance = 0.75 Moment of inertia = 0.00001696 kg/m2 With zero frictional load and taking a feed forward gain of 2, determine the motor response for a unit step function. please forwaded the answer to the below mail id thanks in advance Regrads, peer_kaba@yahoo.co.in
1984Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********
4 6850
What are advantages of using Java?s layout managers than windowing systems?
How to synchronize slow growing bacterial species of Cyanobacteria, Thiobacilli, Mycoplasma?
What Testing process U r following in ur organization?
what r the strategies & methodologies r u following in preperation of test cases based on usecase?
Which one of the following activities is the most efficient and most cost effective at identifying defects? 1. Prototyping 2. Unit test 3. Beta test 4. Design/code inspection 5. Risk analysis
The Following Characterstics posses some XYZ company. * Uses formal standards and policies * Conducts software inspections * Has advanced configuration management and change control * Uses CASE tools * Has a software engineering process group * Gathers metrics on process and quality * Requires that developers have formal software engineering training * Practices continued process improvement Based on aboue , Tell me which CMM Level is the company..? 1. Level 1 - Initial 2. Level 2 - Repeatable 3. Level 3 - Defined 4. Level 4 - Managed 5. Level 5 - Optimizing
Rules of civil law are different than that of criminal law. Are you prepared to enter this knowing that there is little guidance from within our office?
During a heart attack, blood flowing to the heart muscle is interrupted by blockage of a coronary artery. How would you expect the metabolism in the heart to change?
A 22 year old woman collapses following Neville Barnes forceps delivery of the second twin. She is hypotensive and tachycardic and the estimated blood loss is now 800ml. How would you manage this situation?
I'm new to sewing, and I need to know what are some good pieces to start with?
Which namespace do the classes, allowing you to support COM functionality, are located?
Who was the first person to recognize that true flies have two wings and gave them the name ?Diptera??
Who was the first person to recognize that true flies have two wings and gave them the name ?Diptera??
What is the trouble in growing streptococcus species?
What are the Conditions for growing slow-growing mycobacteria?