Write a statement that assigns finalResult with the sum of num1 and num2, divided by 3. Ex: If num1 is 4 and num2 is 5, finalResult is 3.
Write a temperature conversion GUI that converts from Fahrenheit to Celsius.
Create a super class called car.
a. The car class has the following fields and methods.
-Intspeed;
-doubleregularPrice;
-stringcolor;
-doublegetSalePrice();
b. Create a sub class of car class and name it as pickup. The following fieldsand methods.
-Intweight;
-doublegetSalePrice()
*** If weight is greater than 2000, 15% discount otherwise 25%
c. Create a sub class and name itas Nissan. The following fields and methods.
-Intyear;
-intmanufacturerDiscount;
-doublegetSalePrice()
***From the sale price computed from car class, subtract the manufacturer discount.
d. Create a sub class and name it as Toyota. The following fieldsand methods.
-Intlength;
-doublegetSalePrice()
***If length is less than 20 feet, 10% discount. Otherwise, 15% discount.
e. Create a MyShop class which contains the main() method. Perform the following within the main() method.
-Create an instance of Toyota class and initialize all the fields with appropriate values. Use super(...) method in the constructor for initializing the fields of the super class.
-Create two instances of the Nissan class and initialize all the fields with appropriate values. Use super(...) method in the constructor for initializing the fields of the super class.
-Create an instance of car class and initialize all the fields with appropriate values. Display the sale prices of all instance.
Write a java program that create a class savacnt, use a static variable anintrate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savbal indicating the amount the saver currently has ondep. Provide method calcmonthint to calculate the monthly interest by multiplying the savbal by anintrate divided by 12 this interest should be added to savbal. Provide a static method modiintrate that sets the anintrate to a new value.
Write a program to test class savacnt. Instantiate two savacnt objects, savel and save2, with balances 4000 and 6000, respectively. Set anintrate to 5%, then calculate the monthly interest and print the new balances for both savers. Then set the anintrate to 6%, calculate the next month's interest and print the new balances for both savers.
Create a sample (Java) program that displays the sum of integers from 1 to 50.
rite and test a JAVA program that merges two heaps together the output should be a heap
Write a program thatcan store a student’s first name, last name, five test scores,
average tests score, and grade. (Use an array to store the test scores.) The program must contain methods
to calculate test averages, return test averages, calculate grades, return grades,
and modify individual test scores. The method toString must return test data (including student’s
name, five test scores, average, and grade) as a string. Write a program to calculate students’ average
test scores and the grade. You may assume the following input data:
Jack Johnson 85 83 77 91 76
Lisa Aniston 80 90 95 93 48
Andy Cooper 78 81 11 90 73
Ravi Gupta 92 83 30 69 87
Bonny Blair 23 45 96 38 59
Danny Clark 60 85 45 39 67
Samantha Kennedy 77 31 52 74 83
Robin Bronson 93 94 89 77 97
Sheila Sunny 79 85 28 93 82
Kiran Smith 85 72 49 75 63
The program should output data as close as possible to the following form:
First_Name Last_Name Test1 Test2 Test3 Test4 Test5 Average Grade
Jack Johnson 85.00 83.00 77.00 91.00 76.00 82.40 B
Lisa Aniston 80.00 90.00 95.00 93.00 48.00 81.20 B
Andy Cooper 78.00 81.00 11.00 90.00 73.00 66.60 D
Ravi Gupta 92.00 83.00 30.00 69.00 87.00 72.20 C
Bonny Blair 23.00 45.00 96.00 38.00 59.00 52.20 F
Danny Clark 60.00 85.00 45.00 39.00 67.00 59.20 F
Samantha Kennedy 77.00 31.00 52.00 74.00 83.00 63.40 D
Robin Bronson 93.00 94.00 89.00 77.00 97.00 90.00 A
Sheila Sunny 79.00 85.00 28.00 93.00 82.00 73.40 C
Kiran Smith 85.00 72.00 49.00 75.00 63.00 68.80 D
Class average = 70.94Internet of things(IOT) is an interconnection of physical devices and internet. These devices have the capability to sense, monitor and respond to various actions. In current situation of pandemic COVID-19, it has been observed that touching of things like thermometer by different persons could enhance the possibility to transfer the virus from thermometer to second person, if the thermometer was touched by COVID positive person.
Suppose as a java programmer, you are given a task to develop an application which could check patient’s temperature without touching thermometer or patient’s body.
To develop this app for IOT device, what do you think Java language should prefer on other languages or not? Justify your answer with solid reason.
JAVA GUI AND OOP Overview: Java Swing is a lightweight Graphical User Interface (GUI) toolkit that includes a rich set of widgets. It includes package lets you make GUI components for your Java applications, and it is platform independent. In this activity, students will have an opportunity to design a GUI of a simple java program. Instruction: Create a program that would compute for the total amount of purchase based on user preferences. Design the user interface and the source code using object-oriented programming Requirements Design the user interface of the Pizza Ordering System. Sample interface design shown below (Design your own interface but use the same tools for every section) Pizza Ordering System Date July 05. 2019 Customer Available Pizza Mountain Pizza Regular Personal O Family O Pasta Spaghetti w/ Meatballs Supreme O Meat Lovers Special Pansit Bihon Pansit Palabok O Veggie Lovers Hawaiian Sotanghon Bacon Lovers 0 Drinks Glass/Mug Pitcher Crust type Thick Additional Cheese Beef Bacon O Drum Governor Pack Road, Baguio City Contact Number: 442-3316 Thin Details Compute Total Amount Amount Due: $643.50 Discount. $0.00 Tax (22%): $181 50 Close Application Pungratumer g: Diar Terrirgar , Total Amount $825.00 Compute the total amount that the customer will pay based on the following Price List: Pizza Supreme Meat Lovers Veggie Lovers Hawaiian Bacon Lovers Personal P 350 P 300 P 250 P 275 P 275 Regular P 550 P 500 P 450 P 400 P 400 Family P 1,000 P 850 P 600 P 750 P 800 If the customer orders Family Supreme pizza, the pizza would cost P1,000.00. If the customer orders another pizza, let say Regular Hawaiian pizza, add P400 to the cost. The total amount would be P1,400.00. Also, include in the total amount the additional orders (see table below) the customer might avail. Additional Order: Food Spaghetti with Meat ball P 95 Special Pansit Bihon P 50 Pansit Palabok P 75 Sotanghon P 60 Soft drinks in: Glass/Mug P 25 Picher P 65 Р 120 Additional: Cheese P100.00 Beef 250.00 Bacon 200.00 Dum In the details area, compute for the amount due which is 78% of the computed total amount, and the Tax which is 22% of computed the total amount. Source code must be in OOP style. Create classes of each type of pizza. In each class, encapsulate the prize by creating a private attribute. Use setter and getter method to pass the prize value to main class which is your interface (JFrame). You may use a simple conditional statement for additional orders and no need for a separate class. A practice activity is given as your guide. PRACTICE ACTIVITY: 1. Create a project Pizza and add a JFrame form. 2. Create a sub class of Pizza named Supreme. 3. Add a radiobutton, label and a button By default the names of the tools are as follows JRadioButton1 , JLabell and JButton1 4. Add the following code to Supreme class (Let's say prize = 280) package pizza; public class Supreme Pizza extends PizzaJFrame { private int prize; public void setPrize ) { this.prize= 280; } public int getPrize() { return prize; } 5. Go to your JFrame Form and double click JButtonl and add following code 85 Ç 86 87 88 89 private void jButtonlActionPerformed (java.awt.event. ActionEvent evt) if (RadioButtonl.isSelected()) { Supreme Pizza pl = new Supreme Pizza (); pl.set Prize(); jLabel1.setText (Integer.toString(pl.getPrize())); }else{ JOptionPane.showMessageDialog(this, "Other Pizza Type"); } 90 91 92 93 Note: The codes shaded in gray is automatically added by netbeans. NO NEED TO ADD ANOTHER ONE. Just add the if block. 6. Test the program. Click the button while the radio button is unchecked. A message box will appear. Test it again this time check radio button and click the button. The labell must display 280.
PLEASE HELP ME WITH THIS FOR FREE. I DON'T HAVE MONEY TO PAY SO I NEED JUST HELP FOR THIS. THANKS. I WILL BE SUBMITTING IT EARLY
Homework;
Please create a sample program using try, catch and finally if the user will input incorrect value (user can enter number, string character, etc...) -