Question
USE OBJECT ONLY Create a dynamic array of students: Insert student id, student name, score1, score2 From this input: calculate total of score in another
USE OBJECT ONLY
Create a dynamic array of students:
Insert student id, student name, score1, score2
From this input: calculate total of score in another column calculate average of scores in another column display the grade based on average
-----> Criteria is if student have A Gold, B Silver, C Bronze, D No Medal, F Repeat.
Sample Output:
Index Student ID Student Name Score1 Score2 Total Average Grade Criteria --------------------------------------------------------------------------------------------------------------------- 0 12 John 90 90 180 90 A Gold 1 14 Eliza 70 70 140 70 C Bronze 2 13 James 80 80 160 80 B Silver
and so on ....... Then display the menu: ----------------------------------------------------------------- 1.To insert a student 2.To delete a student based on name 3.To delete a student based on id 4.To insert a student based on index number 5.To delete a student based on index number 6.Sort by Id 7.Sort by Name 8.Search by Id 9.Search by Name 10.Print file (bonus)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
======================================================================
Question 3:
Use Array List for Grocery store:
Display a menu where you can enter the product, grocery item, their quantity and their price.
The output should be something like this:
Product Item Name Quantity Price Amount --------------------------------------------------------------------------- Meat Beef 2 2.00 4.00 Diary Milk 1 3.00 3.00 Diary Yogurt 2 4.00 8.00 Snack Chocolate 2 2.00 8.00 Meat Turkey 3 2.00 15.00
Subtotal: 38.00
and so on.....
Display a menu where it will ask for you to input data:
1. Insert a product 2. Insert a grocery item based on product 3. Remove a grocery item 4. Modify a grocery item 5. Search by grocery item name 6. Search by product name 7. Sort by product name and display their subtotal 8. Sort by grocery item name and display their subtotal 9. Use the first initial of product to display the items 10. View your cart 11. Display a receipt with subtotal, tax and total. 12. Print your receipt in file
In the end you should display the whole receipt: --------------------------------------------------------------------------- Product Item Name Quantity Price Amount --------------------------------------------------------------------------- Meat Beef 2 2.00 4.00 Diary Milk 1 3.00 3.00 Diary Yogurt 2 4.00 8.00 Sweet Chocolate 2 2.00 8.00 Meat Turkey 3 5.00 15.00 ---------------------------------------------------------------------------- Subtotal: 38.00 Tax: 6.43 Total: 44.43 ----------------------------------------------------------------------------- Thank you, come again -----------------------------------------------------------------------------
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started