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

4. During each summer John and Jessica grow vegetables in their back yard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly.
//Logic errors. import java.util.*; public class Ch3_PrExercise4 { static Scanner console = new Scanner(System.in);
public static void main(String[] args)
{ double cost; double area; double bagSize
. Suppose that you have the following statements:
String str;
str = "Java programming: from problem analysis to program design";
What is the value of the following expressions?
a. str.indexOf("analysis")
b. str.substring(5, 16)
c. str.startsWith("Java")
d. str.startsWith("J")
e. str.endsWith(".")

The program necessary for advisors in a university to control their students

You are expected to design and write. Required using the Object Oriented Programming approach

Identify the classes and their responsibilities / characteristics.

- Assume a maximum of 10 consultants and each consultant have a maximum of 40 students.

- Each student can take up the total credit of the semester at most. Credit counts

Karadeniz Technical University Computer Engineering Department

you can use.

- 3 credits for students whose average is between 3.0 - 3.49, 6 credits for students with 3.5 and above

they can get extra.

- The advisor has access to the student's personal information, transcript and weekly schedule, and this

can change the information.

JAVA


Create a class named 'Employee' having the following members:
Data members
1 – Name
2 – Age 3 - Phone number
4 – Address 5 – Salary
it also has a method named printSalary () which prints the salary of theemployee
,Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager' classes have data members 'specialization' and 'department' respectively. Now,
(a)- Assign name, age, phone number, city and salary to an employee and a manager by making an object of both of these classes and print the same.

Write the method that takes a RegularPolygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclusive, and sets its side length to a random decimal number greater than or equal to 5 and less than 12. Use Math.random() to generate random numbers.

This method must be called randomize() and it must take an RegularPolygon parameter.

call the method in the program's main method so that it can test whether it works, but you must remove or comment out the main method.

https://amooc.github.io/edhesiveshapes/


Write a program that computes the cost of painting and installing carpet in a
room. Assume that the room has one door, two windows, and one bookshelf. Your program must do the following:
a. Prompts the user to enter, in feet, the length, width, and height of a
room. Read the dimensions of the room.
b. Prompts the user to enter the widths and heights, in feet, of the door,
each window, and the bookshelf. Read these quantities.
c. Prompts the user to enter the cost, per square foot, of painting the
walls. Read these quantities.
d. Prompts the user to enter of cost, per square foot, of installing carpet.
Read these quantities.
please help me out on this program in OOP(java program)
To avail of a college scholarship, an applicant must provide three figures: his NSAT score, monthly salary of his parents, and entrance examination score. The college may either decide to accept, reject, or further study his application based on the following conditions:
Rejected is any of the following exists:
a. Parents’ salary is above 10,000
b. NSAT score is below 90
c. Entrance exam score is below 85

Accepted if all of the following are met:
a) Parents’ salary is at most 3,500
b) Average of NSAT and entrance exam is at least 91

Any application which is neither accepted nor rejected will be subjected for further study. Make a program that would input the NSAT score, parents’ salary and entrance exam score and then output whether the applicant is accepted, rejected or for further study.
please help me out on this program in OOP(java program)?
An applicant will accepted to the Jedi Knight Military Academy is he is least 200 cm. tall; age is between 21 and 25, inclusive; and a citizen of the Planet Endor. However, if the applicant is a recommendee of Jedi Master Obi Wan, he is accepted automatically regardless of his height, age and citizenship. Write a program that would input the applicant’s height, age, citizenship code(“C” for citizen of Endor, “N” for non-citizen), and recommendee code (“R” for recommendee, “N” for non-recommendee) and then output whether the applicant is accepted or rejected.
Write a program that computes the cost of painting and installing carpet in a
room. Assume that the room has one door, two windows, and one bookshelf. Your program must do the following:
a. Prompts the user to enter, in feet, the length, width, and height of a
room. Read the dimensions of the room.
b. Prompts the user to enter the widths and heights, in feet, of the door,
each window, and the bookshelf. Read these quantities.
c. Prompts the user to enter the cost, per square foot, of painting the
walls. Read these quantities.
d. Prompts the user to enter of cost, per square foot, of installing carpet.
Read these quantities.
. To make a profit, a local store marks up the prices of its items by a certain
percentage. Write a Java program that reads the original price of the item
sold, the percentage of the marked-up price, and the sales tax rate. The
program then outputs the original price of the item, the marked-up percentage of the item, the store’s selling price of the item, the sales tax rate,
the sales tax, and the final price of the item. (The final price of the item is
the selling price plus the sales tax.)
LATEST TUTORIALS
APPROVED BY CLIENTS