1.5 students participated in a Exam. There were 3 subjects. All numbers were stored in a two - dimensional array.
Marks
...
onal array.
Marks of each students :
CSE115 CSE 173 CSE215
Jamal 80 70 60
Mamunul 57 76 74
Saad 67 98 87
Rana 98 87 90
Mabubur 45 97 34
1. How to create function named myTotalMark which calculate Total Obtained marks of each students, Print Total marks of each students with their name. Note: Create 2D array using marks in this function and pass same array to next function(specificStudent and specificMarks) as a parameter.So you have to call those function from myTotalMark.
2. Now create another function named specificMarks which calculate Total average marks of Three specific subjects according to teachers input(1 to 5).If teacher Enter 1 it will calculate average marks of CSE115 course.Store marks in a Array and print average marks with subject name. void specificMarks(int subject[5][3])
3. Create another function named specificStudent which calculate Three Specific students marks according to teachers input(1 to 10).If teacher Enter 1 it will calculate the total marks of Jamal.Store marks in a Array and print three students mark with their name.Pass this array to Grade function as a parameter. void specificStudent (int student[5][3])
4. Create another funciton named grade which Calculate grade of Three students which were obtained in specificStudent Function.Using this range: void grade(int number[ ] )
100-200 B+
201-300 A-
301-500 A
5. Now create main function and call only myTotalMark function to display output.
please do it in #c program
View More
2.Learning Objectives
Design and write pseudocode using a repetition structure
Design and write Java for a class, including attributes, accessors, mutators, and
...
va for a class, including attributes, accessors, mutators, and constructors.
Design and write Java for an application program that instantiates and uses objects of a user-defined class.
Use the repetition structure in class methods and application program modules.
Perform error checking.
Use a graphical drawing program (ArgoUML) to create class diagrams.
Directions for completing and submitting the homework:
You will be submitting the following files:
Task #1:
Pseudocode written with Word, Notepad++, or similar application
Task #2:
Pennies.java
Task #3
Inventory.java
The application class created in 3b below
The UML class diagram created in ArgoUML, Raptor, or similar application
Homework Assignment:
Write the pseudocode needed to complete Chapter 5, number 9 – Pennies for Pay.
Implement Pennies for Pay in Java.
The Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. Design a class diagram showing the class, the application program, the relationship between the two, and multiplicity. Then write the Java code as described below. Be sure to follow the CSI 117 Style Criteria (Links to an external site.) for naming conventions, class diagrams, pseudocode, keywords, and operators.
An Inventory class that contains:
an item number and the original price of the item. Include the following:
A default constructor that initializes each attribute to some reasonable default value for a non-existent inventory item.
Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated. Be sure to incorporate adequate error checking for all numeric attributes.
Accessor and mutator methods for each attribute. Be sure to incorporate adequate error checking for all numeric attributes.
Extra credit for including Javadoc comments.
An application program that contains two methods: the main() module and the printSaleData()module.
The main()module must do the following:
create an Inventory object using the default constructor
use a loop to get inventory items from the user. The user should enter the item number and the original price of the item. This loop should continue until the user indicates that they have no more items to enter. For each item entered by the user, the code inside the loop should do the following 2 items:
set the attributes of the Inventory object by calling the appropriate method in the Inventory class for each item entered by the user
send the Inventory items, one at a time, to the printSaleData() module for processing
Extra credit for including Javadoc comments.
The printSaleData()module must accept an Inventory object and produce a report that shows the item number and the price of an inventory item on each day of the sale, one through seven, using a loop. For example, an item with an original price of $10.00 costs 10 percent less, or $9.00, on the first day of the sale. On the second day of the sale, the same item is 10 percent less than $9.00, or $8.10.
View More