Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with function or with the entire problem. By using Matlab programing thanks. discussed in class In this problem, you will be implementing a

image text in transcribedimage text in transcribedPlease help with function or with the entire problem. By using Matlab programing thanks.

discussed in class In this problem, you will be implementing a gradebook structure, and a custom constructor function to add new entries. Your structure should have three fields, a student name, a student ID number, and a field including an array of grade values for that particular student. 1. You must create a custom constructor function, which will do one of two things based on the number of input arguments: If four arguments are passed to this function (structure name, student name, student ID, and grade array), it should create a new entry in the given structure with the correctly populated fields. For example, if you pass the empty structure called ece72f17 (look up in the struct to see how to make an empty structure) with a new student entry into your function with this example code: ece72f17-gbStructConst (ece72f17,John Doe', 1234, [80 94 79]); then the returned structure should be modified to contain the above student as the only entry, so if I typed ece72f17 (1) . studentID I would get ans1234 That constructor could be used to add students, for example the following code: ece72f17-gbStructConst (ece72f17,'Jane Doe', 4321, [98 92 84]) would add Jane to the gradebook. Secondly, if only three arguments are passed into this function (structure name, student ID, and a grade input), then it should correctly append the grade value into the appropriate student entry's grade array (using the ID to determine the correct student). For example, using the same example from above, if I then input this ece72f17-gbStructConst (ece72f17, 1234, 75); then the returned structure should be modified to add that grade to the student with the matching student ID, so if I typed ece72f17 (1).grades I would get ans [ 80 94 79 75] . If the ID number is not found, it should return an appropriate error message to the user. 1 of 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions