Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

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 & Filtering

The data has been collected from UiTM students as a respondent to find out their confidence level in getting high marks for subject CSC415. The survey has been given to those students who are taking the subject for the current semester. The respondent will give a score from 1 to 5 only, where score 1 represents the lowest confidence level of getting good mark for the subject, while, score 5 represents the highest confidence level of getting good mark for the subject.

You are requested to write a Java program to do the following:

• input all the respondent scores

• make sure the program only reads the valid score number which is 1

to 5 only, other than that number, display the error message.

• the program will determine the total number of respondents for each score and overall number of respondents who are involved in

the survey.

• it also needs to calculate and display the average score result.

The input will continue until user chooses to stop entering the data.



  Customer Category

Home

Commercial Industrial

Tariff

The first 100 units : RM0.10 per unit The next 200 units : RM0.17 per unit Over 300 units : RM0.20 per unit The first 200 units : RM0.30 per unit The next 400 units : RM0.27 per unit Over 600 units : RM0.20 per unit The first 100 units : RM0.10 per unit Over 300 units : RM0.20 per unit

Rent (RM)

25.00

50.00 100.00

      Write a complete Java program that prompts the user to enter the following data:

• The customer name

• The customer address

• The customer category

• The units used

Then, the program will calculate the amount due and print the bill. This process will continue as many as the user wishes and will terminate when the user requests to stop.

Upon stopping the billing process, the program will generate a report that displays the following information:

• The total number of customers in each category

• The total collection in each category

• The total collection for the CityPhone Telephone Company


Write a program that computes the total ticket sales of a concert. There are three types of seating’s: A, B, and C and the price of a ticket for each of the three types of seats are 3000 Rs ,2000 Rs , and 1000 Rs respectively. The program accepts the number of tickets sold in each category. The total sales are computed as follows:

totalSales = numberOfA_Seats * pricePerA_Seat + numberOfB_Seats * pricePerB_Seat + numberOfC_Seats * pricePerC_Seat;


Write a program that computes the total ticket sales of a concert. There are three types of seating’s: A, B, and C and the price of a ticket for each of the three types of seats are 3000 Rs ,2000 Rs , and 1000 Rs respectively. The program accepts the number of tickets sold in each category. The total sales are computed as follows:

totalSales = numberOfA_Seats * pricePerA_Seat + numberOfB_Seats * pricePerB_Seat + numberOfC_Seats * pricePerC_Seat;


Build an application which checks eligibility to enter a party venue. Prompts the user for their age and apply the following rules:

  • Younger than 18 is denied entry
  • Between 18 and 35 is allowed entry
  • 35 and older is too old.

Extend this application to prompt whether the person female or male. Females are granted free entry and males pay R10 per person in their group. After prompting for number of guests, display the price to be paid, if any.

Use JOptionPane


An educational institution wishes to maintain a database of its employees. The database is divided into a number of classes whose hierarchical relationships are shown in the below figure. The figure also shows the minimum information required for each class. Specify all the classes and define methods to create a database and retrieve individual information as and when required


Write a java program to print all natural numbers from 1 to n - using while loop

This project is related to HR department of a pharmaceutical company. This company has 10 salesmen with a commission of 550 for each sale. For this project you have to follow these requirements. A class that models Sales Person with following attributes:Id: IntegerName: StringTotal Sales: DoubleSalary: Double With following Functions to be done:·        Having parameterized constructor·        Provide getters and setters for data member(s)·        Double SalaryCalculation (int id): HR officer entered an id (input from user) of a sales person and function returns total salary by adding its commission of that particular sales person.  Note: Any type of Input and output should be in the main class. 

Write a program that has these overloaded search methods to do array searching:


boolean search(int[] arr, int searchKey) – searches an integer array given a search key value, returns true if searchKey is found, false if not.


Hint:

boolean found=false;

for(int i=0; i<arr.length; i++){

   if(    ){//compare the array element with the search key value

      //action taken if found

   }

}

//return something


boolean search(String[] arr, String searchKey) – searches an array of strings given a search key value, returns true if searchKey is found, false if not.

(read Comparing_Strings.doc)


In the main method, you can declare and initialize the two arrays with random values, for example:

int[] intArray={7,3,2,8,1,0,9};

String strArray={"Enchanted","Bedazzled","Divine","Delighted","Elegant"};


Use the methods in the program.




Write a program to create two Threads. 1st Thread printing the table of the number (each after a period of 1 sec) entered by the user and 2nd Thread printing each character of the sentence after a period of 1s. Thread 1 must be executed first completely before starting of thread 2.

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS