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

Planning in forms of Pseudocode and Flowcharts for a Vending machine


Body Mass Index (BMI) is one of the criteria that is used to calculate whether one is fit or not basing on a person’s height (m) and weight (kg). The criterion is very simple; if one’s BMI is 25 or greater, it signifies overweight. A BMI less or equal to 18.5 indicates underweight. Lastly, a BMI greater than 30 shows obesity.

You have been requested to create a program that that helps the Namibian Defence Forces’ (NDF) Captain to calculates the BMI of a person (BMI = weight/height2) and also determine whether the person has also completed running 10 km in the required time. Men should complete 10km in less than 60 minutes for them to be accepted. Women should do that under 80 minutes. Both males and females are accepted if their BMI is less than 25 and greater than 18.5. For 2018 intake, there are already 6 males selected and 1 female. The values for gender, mass and weight are enter by user inputs





Your task is to then create a java program that when given an acronym with its meaning plus some sentence, the program replaces the first occurrence of the acronym in the sentence with its meaning.

 Sample run 1: 

Enter an acronym and its meaning (separated by spaces): NUST Namibia University of Science and Technology                               

Enter a sentence: Welcome to my NUST.                                                            Output: Welcome to my Namibia University of Science and Technology.

Given a number N, create a 2D arrays with n rows and n columns. Now inspect the matrix pattern below and come up with a formula to populate the array for any give NXN matrix.

5      4      3    2   1

10    8      6    4   2

15   12     9    6   3

20   16    12   8   4

25    20   15  10  5


Create a java program that initialize a two dimensional array with the continuous assessment marks used to determine the semester mark for PRG510S exam qualification, The system should also create an array of student names in correspondence to the marks (Note: the appropriate weights of each individual assessment are given under corresponding headings and both the marks and student names are read from the user input).

test1

 (Weight 20%)

test2

 (Weight 20%)

labs

 (Weight 20%)

in_class exercise

(Weight 10%)

assignment

 (Weight 30%)

John

50

60

79

89

63

Harry

41

52

68

56

40

Uushona

30

20

52

38

47

Sililo

23

Enter class size: 4

Enter student name:John

Enter John’s semester marks: 50 60 79 89 63

Enter student name:Harry

Enter Harry’s semester marks: 41 52 68 56 40

Enter student name:Uushona

Enter Uushona’s semester marks: 30 20 52 38 47

Enter student name:Sililo

Enter Sililo’s semester marks: 23 33 45 19 27

Write a java program that accepts given n number of marks for a PRG510S test, and stores them into an array named marks. After all marks have been entered your program should accomplish the following: 

[- to be provided by user input]

a)   Find and display the highest mark

b)   Find and display the lowest mark

c)    Compute and display the average mark

(Above tasks (a, b, and c should be accomplished using only one loop)

 

Sample Run1

            Enter numbers of marks: 10

           Enter 10 marks: 55 60 89 75 25 77 92 15 68 40

Output1: Highest Mark = 92%

Lowest Mark = 15%

Average = 58%

Write a java program that specifies three parallel one dimensional arrays name length, width, and area. Each array should be capable of holding a number elements provided by user input. Using a for loop input values for length and width arrays. The entries in the area arrays should be the corresponding values in the length and width arrays (thus, area[i] = length [i]* width [i]) after data has been entered display the following output:


Length Width Area


-------- -------- -------


25 2.6 65.00


18.2 4.9 89.18


Sample Run1


Enter the array size: 5


Enter the Length and Width for Rectangle 1: 25 2.6


Enter the Length and Width for Rectangle 2: 18 4.9


Enter the Length and Width for Rectangle 3: 100 3.27


Enter the Length and Width for Rectangle 4: 1.84 7.4


Enter the Length and Width for Rectangle 5: 56 9.5


Given a dc bias of 0.5mA and a bandwidth of 10 kHz, calculate for the noise current.


vending machine application which allow user to enter a code of item or pin code used by owner. If item code is entered the balance/cost of item is displayed & prompts user for how many items they want, if the ownerà ƒ ƒ ƒ ¢ € ™s pin is entered the admin menu is displayed. The landing page gives description of machine e.g the Name, address, random items in stock & prices,The application prompts the owner for login confirmation code. Once logged in offer these options to admin, the restock/add new items, change prices, Cash out / cash in certain amount, print summary of items in stock, amount of cash in categories(How many 100s, 50s up to 5cs) & prints only items that need restocking (all items below 25, hence quantity of 25 is the re-order level) or exit, create a menu for this options. When cashing out/in amounts the owner indicates how many 100s, 50s and soon as information is recorded. The customer can buy items & get a receipts . Receipt contains: items names, quantity, price & total, description of the change.

Write a static method to return a double (parameter) rounded to the nearest 100th. Use the Math class' round method. Put this method in a class called My Math. Hints: multiply the double parameter by 100, round that, divide the rounded result by 100. Write a method to print a number (double parameter), its square and its cube, all rounded to the 100th, calling the round100th method created earlier in My Math class, but put this method in another class called Try My Math. Write a Java application program (main) that calls the method written earlier My Math class, passing Math .E in main. Put main in the Try My Math class.


LATEST TUTORIALS
APPROVED BY CLIENTS