# OOPS Assignment

The second is a list of operations. For each class, select the operations that make sense for object in class. Discuss the behavior of each operation listed for each class Classes variable length array-ordered collection of objects, indexed by integer , whose size an vary at run time Symbol Table- a table that maps text keywords into description Set-unordered collection of objects with no duplicates Operations Append—add an object to the end of collection Copy—make a copy of a collection Count—return the no.

**OOPS Assignment**specifically for you

F elements in collection Delete—remove a member from collection Index—retrieve an object from a collection at a given position Intersect—determine the common members of two collections Insert—place an object into a collection at a given position Update—add a member to a collection, writing over whatever is already there Variable length array-ordered collection of objects, indexed by integer , whose size can vary at run time 1. Insert: To insert an object in ordered collection. 2. Index: Indexed by integer to retrieve an object from a collection. . Count: Return no. Of elements whose size can vary at runtime. 2 Set-unordered collection of objects with no duplicates: 1. Insert: To insert an object into a collection. 2. Intersect: To determine the duplicates in a collection. 3. Delete: To delete any object or a duplicate member from a collection. 4. Update: To update a collection by including new member. Symbol Table- a table that maps text keywords into description. 1 . Insert: To map text keywords into description. 2. Count: For Symbol Table. SQ.

If you were designing a protocol for transferring computer files from one computer to another over telephone lines, which of the following details would you select as relevant? Explain how your selected details are relevant a. Electrical noise on the communication lines b. The speed at which serial data is transmitted, typically 300, 1200, 2400, 4800 , or 9600 bits per second c. Availability of a relational database d. Availability of good full screen editor e. Number of tracks/sector on the hard drive 1. The speed at which serial data is transmitted.

To transfer serial data as a computer files from one computer to another speed is required according to the amount of data. Some files use high transfer rates so above 300 or 1200 BSP speed is required. 2. Availability of a relational database. At a time of transferring data through telephone lines a relational database is required as a medium or path to connect different computers with catheter. 3. Number of tracks/sector on the hard drive. Number of tracks/sector on the hard drive is also required as a source or destination at a time of attracting files between computers.

SQ. Define Math Class and which associated functions can be used for the following task To get absolute value To get ceil of number To get floor of number To get natural logarithm (base e) To get Max of two values To get min of two values To generate random number To calculate power for a number To calculate square root of number Proper function syntax and description should be given MATH CLASS: Math class contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.

FUNCTIONS: To get absolute value: Math. Abs() To get ceil of number: Math. Ceil() To get floor of number: Math. Floor() To get natural logarithm (base e): Math. Log() To get Max of two values: Math. Max() To get min of two values: Math. Min() To generate random number: Math. Random() To calculate power for a number: Math. Expo(double a) To calculate square root of number: Math. Sort(double a). SQ. Write a Java application called Summing. Java that takes exactly four integers ND determines and prints the smallest, the largest and the sum of these four integers.

The program’s output should look like the following: The first integer: 4 The second integer: 6 The third integer: 2 The fourth integer: 7 The smallest integer was 2 and largest integer was 7. The sum of these four integers is 19 SOURCE CODE: package summing; import Java. ITIL. Scanner; * @author Monsoon public class Summing { public static void main(String[] rags) { Scanner surprises=new Scanner(System. In); into a[]=new into[4]; into System. Out. Print(“Enter Four integers: “);