Java | JSP | JSF Answers

Questions answered by Experts: 3 611

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Create frame to display two buttons named "Click Me-1" and "Click Me-2". If you click on the "Click Me-1" button then a JOptionPane Message dialog box should display message " you have clicked Click Me-1 button" and 


If you click on the "Click Me-2" button then a JOptionPane Message dialog box should display message " you have clicked Click Me-2 button". Clicking on the cross button in the frame should exit the program.


1. Write a program to read the content of any of the below website and all its sub pages and perform following actions:



1. Parse all the pages and sub pages of



News, Sports and Business section



2. Extract the content, Image and Links



3. Dump the Content, Image and Links into the respective mongo collections





class MyClassCircle {

private double radius;

MyClassCircle(double radius) {

this.radius = radius;

}

public double getArea() {

return Math.PI * radius * radius;

}

}


class GetAreaDemo {

public static void main(String [] args) {

MyClassCircle circle = new MyClassCircle(5.6);

System.out.println("Area of the circle with radius 5.6 equal to " + cicle.getArea());

}

}


What is the use/uses of variable, double radius and MyClassCircle in the program?


Write a Java program to create a new string taking first and last characters from two given strings. If the length of either string is 0 use "#" for missing character.


You are required to design a Car class which has following attributes

        String brand;

        Double price;

        Double quantity;

        String Model;

        Boolean available;

1.     Provide default & Parameterized constructors.

2.     Provide getters & setters for data members.

3.     Provide a toString() method to print values.

 

 Now create an ArrayList of Cars in a class ShowRoom having name and address as attributes as well, Provide appropriate methods, store values in array List (take values form user).

Provide a buy method which will ask user to buy a Car by providing its name, check that it is present or not then ask for quantity and create bill for user.

After that you have to print the following

1.     Add Car

2.     Delete Car

3.     Buy a Car.

4.     Display All cars also display

·        Car of brand “Audi”;

·        Car with name starting with ‘L’.

·        Car name end with ‘n’.

·        Display only last three and first three letters of Showroom name.


You are required to design a Car class which has following attributes

        String brand;

        Double price;

        Double quantity;

        String Model;

        Boolean available;

1.     Provide default & Parameterized constructors.

2.     Provide getters & setters for data members.

3.     Provide a toString() method to print values.

 

 Now create an ArrayList of Cars in a class ShowRoom having name and address as attributes as well, Provide appropriate methods, store values in array List (take values form user).

Provide a buy method which will ask user to buy a Car by providing its name, check that it is present or not then ask for quantity and create bill for user.

After that you have to print the following

1.     Add Car

2.     Delete Car

3.     Buy a Car.

4.     Display All cars also display

·      Car of brand “Audi”;

·      Car with name starting with ‘L’.

·      Car name end with ‘n’.

·      Display only last three and first three letters of Showroom name.


create an ArrayList of Cars in a class ShowRoom having name and address as attributes as well, Provide appropriate methods, store values in array List (take values form user).

Provide a buy method which will ask user to buy a Car by providing its name, check that it is present or not then ask for quantity and create bill for user.

After that you have to print the following

1.     Add Car

2.     Delete Car

3.     Buy a Car.

4.     Display All cars also display

·        Car of brand “Audi”;

·        Car with name starting with ‘L’.

·        Car name end with ‘n’.

·        Display only last three and first three letters of Showroom name.


In the Store class, make an ArrayList of customers, store name, and address implement methods

public void addSale(Customer c) that will add customers to the arraylist.

public void RemoveCustomer(int id);

public void UpdateCustomerRecord(int Id);

public displayAll();

public String nameOfBestCustomer() to record the sale and return the name of the customer with the largest sale.

public ArrayList nameOfBestCustomers(int topN)

 so that it displays the top customers, that is, the topN customers with the largest sales, where topN is a value that the user of the program supplies.

 



In the Store class, make an ArrayList of customers, store name, and address implement methods

public void addSale(Customer c) that will add customers to the arraylist.

public void RemoveCustomer(int id);

public void UpdateCustomerRecord(int Id);

public displayAll();

public String nameOfBestCustomer() to record the sale and return the name of the customer with the largest sale.

public ArrayList nameOfBestCustomers(int topN)

 so that it displays the top customers, that is, the topN customers with the largest sales, where topN is a value that the user of the program supplies. 





In the Store class, make an ArrayList of customers, store name, and address implement methods

public void addSale(Customer c) that will add customers to the arraylist.

public void RemoveCustomer(int id);

public void UpdateCustomerRecord(int Id);

public displayAll();

public String nameOfBestCustomer() to record the sale and return the name of the customer with the largest sale.

public ArrayList nameOfBestCustomers(int topN)

 so that it displays the top customers, that is, the topN customers with the largest sales, where topN is a value that the user of the program supplies.

 

Write a program that prompts following menu and

 

 


                                            Menu


============================================

1. Add Customer record

2. Delete Customer record

3. Update Customer record

4. View all Customers

5. View Best Customer.

6. Find Customer by ID.

1.     Exit.

Ask the user to enter his/her choice then perform the desired function as long as he/she wants.



LATEST TUTORIALS
APPROVED BY CLIENTS