- @ commit c3fbca6fc71b4bb7f5df9acdf9337e65f666dea1 (vs. base ea65a2e14accc3af40470499c2d13250ce71474f)
- Pull request
- Buildkite build
| Benchmark Name | Average Latency (ms) | Median Latency (ms) | Latency Standard Deviation (ms) |
|---|
| Create a class Car with three data members [model, color, brand] and a method [setData, displayCarInfo]. | |
| Create following objects. | |
| Car 1: Model-City, Color-White, Brand-Honda | |
| Car 2: Model-Desire, Color-Red, Brand-Maruti | |
| Car 3: Model-XUV500, Color-Maroon, Brand-Mahindra | |
| You may use setData method to pass all these values. For example, car1.setData(String mdl, String | |
| clr, String brnd). Use the displayCarInfo method to print the details of respective car (E.g. | |
| car1.displayCarInfo();) |
| Write a Java program to implement Vector with following functionality. | |
| Create a vector student with syntax: Vector student = new Vector(); | |
| Using the syntax student.insertElementAt("Mobile",0); to add “Mobile” at 0th location OR use | |
| the syntax Student.addElement(“Mobile”); | |
| Subsequently, add “Laptop”, “Watch”, “Shoes”, “T-shirt” and “Jeans”. | |
| Now, display all the items in student vector using System.out.println(student); | |
| Later, the student decided to return “Jeans” using student.remove(“Jeans”); | |
| After removing Jeans, display the items available with the student. | |
| (You may try other functions related to Vectors mentioned in the lecture note) |
| An employee gets paid (hours worked) × (basic pay), for each hour up to 40 hours for a week. | |
| For every hour over 40, they get overtime = (base pay) × 1.5. | |
| The base pay must not be less than the minimum wage (Rs. 150 an hour). | |
| If it is, print an error. | |
| If the number of hours is greater than 60 per, print an error message. | |
| Write a Java program that reads | |
| (1) basic pay per hour and | |
| (2) number of hours worked per week and display the wage/salary to be paid to him/her. |
| For any number “i”, the pentagonal number is computed using the equation [i*(3*i-1)]/2. | |
| Hence, write a Java program with getPentagonalNumber as method that takes a number “i” as input and returns the equivalent | |
| pentagonal number. | |
| Print first 4 (n=4) pentagonal numbers (E.g. 1, 5, 12, 22 as shown in the figure). |
| The formula for calculating Body Mass Index (BMI) is weight (kg) / [height (m)]^2. | |
| A person is | |
| "Underweight" if BMI is below 18.5, | |
| "Normal" if BMI is between 18.5 to 24.9, | |
| "Overweight" if BMI is between 25.0 to 29.9, and | |
| "Obese" if BMI is 30.0 and Above. | |
| Write a Java program that reads "weight" (in kg) and | |
| "height" (in meter) and display the status of the person (e.g."Underweight", "Normal" etc.) |
| Benchmark Name | Average Latency (ms) | Median Latency (ms) | Latency Standard Deviation (ms) |
|---|
| 1.5 | |
| Write a Java program to display all the prime numbers between two given numbers. | |
| (You may initialize the two numbers or read them from keyboard or input them as command line arguments) |
| 1.4 Create a class stack with data[size] and stackTop as data members and push, pop and display as methods. | |
| Write a Java program to create an object of stack class in main and invoke all the three functions from main to test their working. |
| The class should have methods viz. | |
| (a) depositMoney, | |
| (b) withdrawMoney and | |
| (c) askBalanace. | |
| Write a Java program to create an object of Bank class in main function and invoke all the three functions from main to test their working. |
| Up to Rs.2.5 lakh - No Tax (NIL) | |
| Rs.2.5 lakh - Rs.5 lakh - 5% | |
| Rs.5 lakh - Rs.7.5 lakh - 10% | |
| Rs.7.5 lakh - Rs.10 lakh - 15% | |
| Rs.10 lakh - Rs.12.5 lakh - 20% | |
| Rs.12.5 lakh - Rs.15 lakh - 25% | |
| Above Rs.15 lakh - 30% | |
| Write a Java program which initialized the earning of an employee (E.g. int income=1950000;). Your program | |
| should display the outcome (E.g. Income tax to be paid: 307500) | |
| Explanation: |