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

Write a program which takes as input a huge array of numbers. This array is

split into n sub-arrays and n threads apply a bubble sort on each of the n

sub-arrays. Lastly, another thread merges the n sorted sub-arrays into one

with the same size as the original array. Of course, the resulting array

should be sorted


Supposing you are operating a warehouse that receives and issues out items daily, 

and at the end of each day, you take stock of the transactions. Answer the following 

based on your knowledge in Java Programming.

a) Provide a suitable name for your warehouse.

b) Suggest the type of item you are dealing with and the cost of each item (e.g.

bags of cement at 50 cedis per bag).

c) Write a Java programme named transactions.java that takes input from you in the 

form of: positive integers representing the number of items brought in each time, 

and negative integers representing the number of items issued out each time. 

The programme will then calculate and print out the total number of items 

received and issued out, as well as their corresponding total costs. Your 

programme ends when the input is zero (0).


Program 7 Rooms You are required to assist with CPUT. W rite the JAVA classes. the development of a system to manage venues and computer labs at UML class diagram of two base classes Venue class Code the attributes and methods as per diagram 1 for the venue class. Assign the values unknown or zero to the attributes in the noargument constructor. 2 Write the method named show() for the Venue class. This method is void and does not have any parameters. This method displays the details of a ve nue object as follows (real data values are used for building name, room number and number of seats): 1 Applications Development Foundations I

v>

Write a Java programme named transactions.java that takes input from you in the

form of: positive integers representing the number of items brought in each time,

and negative integers representing the number of items issued out each time.

The programme will then calculate and print out the total number of items

received and issued out, as well as their corresponding total costs. Your

programme ends when the input is zero (0).


v> Write a java programme named AddingNumbers.java that uses a method to sum all

the integers from 10 to 20 but skipping 15 and 16. Invoke the method within the print

command line to print: The sum of all integers from 10 to 20 excluding 15 and 16

is 134.


1) Write a Java programme (named EmployeePay.java) that calculates the weekly

pay for each of your employees based on the total number of hours they have

worked in a week using the following guidelines.

All employees are paid a regular hourly rate of some amount. (Determine

that amount in Ghana cedis)

Indicate the number of regular working hours for all employees in a week

Some employees occasionally work overtime and are supposed to be paid for

the hours they have worked overtime. (Determine the overtime hourly rate in

Ghana cedis. Note: Overtime hourly rate should be more than the regular

hourly rate).

Employees can however only do a maximum of 2 overtime hours each day.

Your programme should work as follows:

i. Create data fields (variables) of the appropriate data types to store all the

variables you will use

ii. When the programme runs, prompt an employee to enter the total

number of hours he/she has worked for the week.




v> Supposing you are operating a warehouse that receives and issues out items daily,

and at the end of each day, you take stock of the transactions. Answer the following

based on your knowledge in Java Programming.

a)

Provide a suitable name for your warehouse.

b)

Suggest the type of item you are dealing with and the cost of each item (e.g.

bags of cement at 50 cedis per bag).

c)

Write a Java programme named transactions.java that takes input from you in the

form of: positive integers representing the number of items brought in each time,

and negative integers representing the number of items issued out each time.

The programme will then calculate and print out the total number of items

received and issued out, as well as their corresponding total costs. Your

programme ends when the input is zero (0).




review this


problem again. You can use print to


debug your code. The printf) may not work in case of syntax/runtime error. The version of GCC being used is 5.5.0 An e-commerce company wishes to buckettze its products. Each product has a product ID The product ID is a numeric number The company has to find the bucket ID from the product ID. The company needs an algorithm which takes the product ID as an input, calculates the smallest and largest permutation with the digits of the product ID, then outputs the sum of these smallest and largest permutations as the bucket ID


Write an algorithm for the company to find the bucket ID for the given product


Input


The input consists of an integer producti representing the product ID of the product.


Output


Print an integer representing the bucket ID for the given product


Example


Supposing you are operating a warehouse that receives and issues out items daily, and at the end of each day, you take stock of the transactions. Answer the following based on your knowledge in Java Programming.


a) Write a Java programme named transactions java that takes input from you in the form of: positive integers representing the number of items brought in each time, and negative integers representing the number of items issued out each time. The programme will then calculate and print out the total number of items received and issued out, as well as their corresponding total costs. Your programme ends when the input is zero (0).



Create a program that takes in a student’s full names and marks for 3 In-class exercises, then
calculate the average of this marks. This average mark is then categorized as follows:
Marks obtained Grade Level Message
80 – 100 1 Magnificent!!
70 – 79 2 Excellent!!
60 – 69 3 Good work!!
50 – 59 4 Good!!
0 – 49 0 Fail – Try again next Year!!
Greater than 100 or less than 0 X Invalid Marks!!, Marks
too high. Or Invalid
Marks!!, Negative
marks not allowed.
Sample run 1:
Enter student full names: Goodluck Johnathan
Enter 3 marks separated by spaces: 78 94.6 88
Output: Student name: Goodluck Johnathan
Grade Level: 1
Comment: Magnificent!!
Sample run 2:
Enter student full names: Ellen Johnson Sirleaf
Enter 3 marks separated by spaces: 200 104.87 99.9
Output: Student name: Ellen Johnson Sirleaf
Grade Level: X
Comment: Invalid Marks!!, Marks too high.
LATEST TUTORIALS
APPROVED BY CLIENTS