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

Give an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop, along with the equivalent while loop and for loop. Finally, give an example of a for loop, along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure, and describe those advantages and disadvantages.
In this assignment, you will write a program that asks the user a quiz question and prompts them for an answer until they get the question correct. This program will be the basis for future Programming Assignments in this course.

These instructions assume you are using the Eclipse IDE on your own computer. You may use a different Java environment as long as you can provide your Java code and screenshots for your assignment submission.

Download the Unit 2 Programming Assignment instructions.

Upload the following for your Programming Assignment submission.

Quiz.java
Screenshot showing the input dialog with the quiz question
Screenshot showing the message dialog for the correct answer
Screenshot showing the message dialog for a valid but incorrect answer
Screenshot showing the message dialog for an invalid answer
Write a JAVA program that will input the following data : Student Name, Average, Tuition Fee and output
Total Tuition Fee :
Formula : Total Tuition Fee = Tuition Fee - Discount
If Average is : 95 -100 100% Discount
90-94 25%
85-89 10%
84 and Below no Discount
Define a class named TemperatureConverter. The class has two accessors “toFahrenheit” and “toCelsius” that return the temperature in the specified unit and two mutators “setFahrenheit” and “setCelsius” that assign the temperature in the specified unit.
Using this class, write a program that inputs temperature and converts from Fahrenheit to Celsius and Celsius to Fahrenheit.
Formula:
1. Fahrenheit to Celsius
T(°C) = (T(°F) - 32) × 5/9
2. Celsius to Fahrenheit
T(°F) = T(°C) × 9/5 + 32
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;
Tono loves to do shopping. Today, she went to the market where there are N different types of products. She wants to buy exactly K of them at the minimum cost. Although she is super smart, she wants to check your smartness as well. Can you tell her the minimum cost required to buy exactly K products if she has already decided to buy product J.
Create a flowchart that will accurately represent the logic contained in the
scenario below:
“A program needs to continue prompting a user to enter a number until the total
of all values entered are no longer less than 100.”

Create an class called Book the following attributes

 like,

    book_id as integer

    book_name as String

    book_price as double

    book_write as String



  create another class called BookBO

 which consist one field two methods like

Book[] book


i)public void setBook(Book[] book)


ii)public Book[] getBook()  


iii)public boolean searchBook(int bookid)


create another class called Main to access all other class to save and extract the information of 5 books.


1. RetailItem Class
Write a class named RetailItem that holds data about an item in a retail store. The class should have the following fields:
• description. It is a String object that holds a brief description of the item.
• unitsOnHand. It is an int variable that holds the number of units currently in inventory.
• price. It is a double that holds the item’s retail price.
Write appropriate mutator methods that store values in these fields and accessor methods that return the values in these fields. Once you have written the class, write a separate program that creates three RetailItem objects and stores the following data in them.

Description Units On Hold Price

Designer Jeans 40 34.95
Jacket 12 59.95
Shirt 20 24.95
Question # 2 Answer the followings using Java Code (Marks: 10)
a. How you will read an MS Excel file in Java. Read an MS Excel File in Java
b. How images are displayed in Java jFrame
c. How audio is played in Java jFrame
d. How video clip is played in Java jFrame
e. Create an animated Cartoon in Java, goto Google for help
f. Create a text file in Java, then Write complete Java code to Write the following text to Text file

“Java is an object-oriented programming language developed by Sun Microsystems, a company best known for its high-end Unix workstations. Modelled after C++, the Java language was designed to be small, simple, and portable across platforms and operating systems, both at the source and at the binary level”

Finally, write Java code to read the text from the text file and display it on the jTextFields.
LATEST TUTORIALS
APPROVED BY CLIENTS