Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Swift language Write a class called MarksTable that uses generics. Implement the following in this class: Use Dictionary to store student names and their

In Swift language Write a class called MarksTable that uses generics.

  1. Implement the following in this class:
  • Use Dictionary to store student names and their marks. Names should be a String key and the mark should be generic.
  • Include an append method that takes a tuple including name and mark as a parameter. Add this student and their mark to the Dictionary
  • include a subscript method that provides both get and set functionality
  • include a display method that loops through Dictionary and displays each student and their mark as follows:

Bobo has a mark of 35

Jason has a mark of 98

Ron has a mark of 98

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions