Each customer will type in a code representing the structure of their order, and your program will display (to standard output) a summary of the order components along with the total cost. An order code is exactly nine characters long, representing four optional toppings. The order code positions, from left to right, represent the following elements:
Four optional Items:
1. 'Y' means the customer wants corn (no additional charge), and 'N' means that the customer does not want corn.
2. 'Y' means that the customer wants guacamole ($0.50 extra), and 'N' means that the
customer does not want guacamole.
3.. 'Y' means that the customer wants sour cream (no additional charge), and 'N' means that the customer does not want sour cream.
4.. 'Y' means that the customer wants cheese ($0.50 extra), and 'N' means that the customer
does not want cheese.
Each customer will type in a code representing the structure of his or her order, and your program will display (to standard output) a summary of the order components along with the total cost. An order code is exactly nine characters long, representing five required items. The order code positions, from left to right, represent the following elements:
Five required items:
1. 'A' represents a burrito ($3.00), and 'B' represents a burrito bowl ($4.00).
2. 1 represents black beans (no additional charge), and 2 represents pinto beans (no
additional charge).
3. 1 represents white rice (no additional charge), and 2 represents brown rice ($0.50 extra).
4. 1 represents chicken ($2.00 additional), 2 represents carnitas ($2.50 additional), and 3 represents steak ($3.50 additional).
5. 1 represents mild salsa (no additional charge), 2 represents medium salsa (no additional charge), and 3 represents hot salsa (no additional charge).
from a clinic management system construct a uml diagram, class diagram,object diagram .
a) Create a java project named school
b) Add two classes, namely student and lecturer
c) In student class, create the following methods:
i. calculate_stud_age – This method should take year of birth of the student as a
parameter and calculate and return the student’s age
ii. calculate_ave_mark – This method should take three marks of the student ,
Math, English and Physics marks as parameters and return the average mark
d) In the lecturer class, create the following methods:
i. get_name – This method should take a string (name of the lecture) and
an integer (experience of the lecturer in years). This method should
output/display the name of the Lecture together with his/her designation
based on the years of experiences determined by the following:
Professor – if experience is >= 20 years
Associate professor – if experience is >=15 years
Senior lecturer – if experience is >= 10 years
Associate lecturer – if experience is >=5 years
Junior lecturer – if experience is <5 years
a) Create a java project named school
b) Add two classes, namely student and lect
c) In student class, create the following methods:
i. calculate_stud_age – This method should take year of birth of the student as a
parameter and calculate and return the student’s age
ii. calculate_ave_mark – This method should take three marks of the student ,
Math, English and Physics marks as parameters and return the average mark.
d) In the lect class, create the following methods:
i. get_name – This method should take a string (name of the lect) and
an integer (experience of the lect in years). This method should
output the name of the Lect together with his designation
based on the years of experiences determined by the following:
Professor – if experience is >= 20 years
Associate professor – if experience is >=15 years
Senior lecturer – if experience is >= 10 years
Associate lecturer – if experience is >=5 years
Junior lecturer – if experience is <5 years
Victor has an array of size n. He loves to play with these n numbers. Each time he plays
with them, he picks up any two consecutive numbers and adds them. On adding both the
numbers, it costs him k*(sum of both numbers).
Find the minimum cost of adding all the numbers in the array.
Input Specification:
input1: Size of array.
input2: Elements of the array.
input3: Value of k.
Output Specification:
Return the minimum cost of adding all the numbers of the array.
1. Create four (4) Java classes. Name them RunEmployee, Employee, FullTimeEmployee,
PartTimeEmployee. The RunEmployee class shall contain the main method and will be used to
execute the program.
2. Write a simple payroll program that will display employee’s information. Refer to the UML Class
Diagram for the names of the variable and method. This should be the sequence of the program
upon execution:
a. Ask the user to input the name of the employee.
b. Prompt the user to select between full time and part time by pressing either F (full time) or P
(part time).
c. If F is pressed, ask the user to type his monthly salary. Then, display his name and monthly
salary.
If P is pressed, ask the user to type his rate (pay) per hour and the number of hours he worked
for the entire month separated by a space. Then, display his name and wage.
Ask the user for an integer then ask the user if he/she wants to count up or down. Display a table of numbers where the first column contains the counter, the second column contains the counter plus 10, and the third column contains the counter plus 100. Make it so each number takes up 5 spaces total. If counting up, the first column should contain numbers 1 through the user input; If counting down, the first column should contain numbers -1 through the the negative of the user input; Do user input validation on the word "up" and "down". Allow for any case.
Implement your own version of the stack data structure using java with OOPs principles mentioned functionalities: push, pop, peek, contains, size, center, sort reverse, iterator, traverse/print.
Use of similar data structures already present in the language/framework is not allowed.
Implement the java code with data structure supporting listed functionalities using object-oriented principles
.Hash Table