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).
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).