Question Details

(Solved by Expert Tutors) Homework #3: Strings & Conditionals Function Name: gradeSorter


Inputs:

  1. (double) A vector of student grades.
  2. (char) A string of first initials corresponding to the grades.
  3. (char) A string of last initials corresponding to the grades.

Outputs:

1. (char) A string of first and last initials sorted by corresponding grade.

Function Description:

You try to get on your professor?s good side by mentioning your awesome MATLAB skills. Unfortunately, it backfires because he then ignores FERPA and asks you to write code to sort the first and last initials of the students in the class according to their grades.

Your professor gives you a vector of the student grades, a string of first initials corresponding to the grades, and a string of last initials corresponding to the grades. Given these inputs, write a function that outputs a string with the combined first and last initials of every student, with spaces in between, that is sorted by the students? grades in descending order. To clarify, an output string might look like this: ?RC RW JM LT BS?, where the student RC had the highest grade, and the student BS had the lowest. Notice that there are spaces in between the initials of each student but not after the last student, and note that there is no punctuation in the string.

Notes:

  • ? ?The sort() function will take care of sorting equivalent grades.
  • ? ?You will not have a tie in the grades.
  • ? ?The ascii value of a space is 32. Any other values that appear as a space will be marked as incorrect and result in zero credit. Hints:
  • ? ?The second output of sort() will be useful.


 


Solution details:

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Apr 19, 2020

EXPERT

Tutor

ANSWER RATING

YES, THIS IS LEGAL

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.

Order Now