Create the classes phonebook school and student you will


Project

School/Student Phonebook

Your task is to create the classes School, Student and Phonebook, such that the following Main( ) function should compile and execute correctly:

Implementation hints:

• Create the classes Phonebook, School and Student. You will need to write a constructor for School that accepts a single string which is the name of the school.

• Create properties for the class School. The class School needs only one property which stores the name of the school (of type string). It also needs a class member variable which stores a collection of students. The best way to do that is to use a class similar to C++'s std::vector, called List<>. It can be found in the namespace System.Collections.Generic, so you will need to add a using statement at the top of the School.cs file. Then, you should initialize this variable in the class constructor:

Students = new List( );

• Similarly you have to add one class member variable (property of the List)to the class PhoneBook which stores a collection of schools. You could use the same method as for studens for this property.

• Add a function to the class School called AddStudent. It should accept a single parameter of type Student. It should simply store the student instance in the List member variable (use the Add( ) function which works similarly to the push_back( ) function in std::vector).

• Add properties to the class Student. You will need two properties: SSN, Name and Age. I'll leave it to you to figure out the type of these properties.

• Override the ToString functions in both classes (see the book for details). The Student version of ToString is quite simple, while the School implementation will need the following:

o A local string variable that will contain the end result. You can then use the += operator to concatenate to this variable, and use System.Environment.NewLine; to add a newline to the string. Example:

string result = "Some string" + System.Environment.NewLine; result += "some other string";

o A loop that walks through all students in the collection (also, see the book about foreach statements), and adds each student to the string. Note: you can either call the ToString method for each student explicitly, or use a syntax similar to the one seen inside Main above, where the School instance is printed out explicitly.

• You will new to added the following functions to the PhoneBook class in order to comply with the main program given:

o AddNewSchool:

- Ask user for name. Create new school and add to PhoneBook schools.

o AddNewStudentToSchool:

- For this part you will have to figure out how to ask the user for which school to add the student to. One solution could be to ask the user for the index of the school and then ask user for ssn, name and age, and add the student to chosen school.

o EditStudentInSchool:

- Very similar for when adding new students to schools, you will have to figure out how to ask the user for which school to look for the student in as well as how to ask the user for which student to edit. Both could be solved by asking the user for index of school and then index of student in the corresponding list. Then just ask user for update ssn, name and age, and update the chosen student.

o Override the ToString:

- Simililar to the School class, you could have a loop that walks through all school in the phonebook and call the ToString method for each school explicitly. The printout example above should give you a good idea this should look like

o Html:

- This function should be very similar to sample printout, e.i. it should return a string containing the printout for the entire phonebook. The only difference being that output should be valid HTML.

- This could be an example for the HTML function:

public string Html()
{
StringBuilder result = new StringBuilder();
//...
result.Append(" append html some content ");
//...
//Create and save file a project root
using (StreamWriter writer = new StreamWriter("result.html"))
{
writer.WriteLine(result);
}
//return HTML
return result.ToString();
}

- You will also need to implement the following requirements:

• Make sure to have a single table in the body of the document
• , , , and <body> are mandatory<br />• all tags must be properly nested<br />• all tags are in lowercase (<h1> instead of <H1>)<br />• all tags are properly closed, and empty elements have a trailing slash<br />• (<strong></strong>, and <img src="..." />)<br />• all attribute values are properly quoted (<img alt="Hello" /> instead of <img alt=Hello />)<br />• all attribute names must be in lower case</p> <p style="text-align: justify;">Hand in</p> <p style="text-align: justify;">The deadline for this assignment can be seen on myschool. Hand in a single .zip/.rar/.7z file containing the .cs files plus the .exe file:</p> <p style="text-align: justify;">• School.cs<br />• Student.cs<br />• PhoneBook.cs<br />• Program.cs<br />• PhoneBookApp.exe</p> <p style="text-align: justify;">Please note that this is an individual assignment.</p> <p><strong>Attachment:-</strong> <a href="https://secure.tutorsglobe.com/Atten_files/991_Project.pdf" target="_blank">Project.pdf</a></p></p> </div> <div id="viewreadmore" class="link"> <a id="readmore" href="javascript:void(0);" class="read-more-trigger mar_top10" onclick="changeheight(this)">View Complete Question</a> </div> <div id="DivRequest"> <h4> Request for Solution File </h4> <div class="seprator"> </div> <div class="downloadfiles"> <h5> Ask an Expert for Answer!!</h5> <h6> DOT NET Programming: Create the classes phonebook school and student you will</h6> <h5> Reference No:- TGS02187315</h5> <input type="submit" name="btnGetQuote" value="Request for Solution File" id="btnGetQuote" class="btn btnexperts btn-lg btn-block-sm mar_btm20" /> <p> Expected delivery within 24 Hours</p> </div> </div> </div> <div class="row"> <div class="col-sm-12 reviewbox"> <div class="row "> <div class="panel-group review" id="accordion" role="tablist" aria-multiselectable="true"> <div class="panel-heading" role="tab" id="headingTwo"> <h4 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> Have a Question? (oR Write a Review) </a> </h4> </div> <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo"> <div class="panel-body"> <div class="col-sm-12"> <div class="row search searchbg message"> <span id="RequiredFieldValidator1" style="visibility:hidden;">Write atleast 100 words!!</span> <textarea name="txtcomments" id="txtcomments" maxlength="1000" ValidationGroup="Review" placeholder="Write your review" class="form-control" rows="6"></textarea> <div class="pull-right mar_top20"> <input type="submit" name="btnReviewSubmit" value="Submit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnReviewSubmit", "", true, "Review", "", false, false))" id="btnReviewSubmit" class="btn btn-primary pull-right" /> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="user-comments-area hidden-xs"> <h4 class="text-uppercase mar_btm20"> <i class="fa fa-question-circle"></i>   Recent Questions Asked DOT NET Programming</h4> <ul class="user-comments-list"> <table id="dlMaterials" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_0" class="studenthdname" href="https://www.tutorsglobe.com/question/discuss-the-validity-of-the-given--an-agreement-between-52187311.aspx">Discuss the validity of the given- an agreement between</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_0">discuss the validity of the followinga a territorial allocation agreement between two manufacturers of the same type of</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_1" class="studenthdname" href="https://www.tutorsglobe.com/question/giant-is-presently-seeking-to-obtain-an-exclusive-dealing-52187312.aspx">Giant is presently seeking to obtain an exclusive dealing</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_1">universal video sells video recording equipment in the united states and its sales constitute 40 percent of the total</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_2" class="studenthdname" href="https://www.tutorsglobe.com/question/z-sells-cameras-to-a-b-c-and-d-for-160-per-camera-y-one-of-52187313.aspx">Z sells cameras to a b c and d for 160 per camera y one of</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_2">z sells cameras to a b c and d for 160 per camera y one of zs competitors sells a comparable camera to a for 14850 z in</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_3" class="studenthdname" href="https://www.tutorsglobe.com/question/in-this-paper-you-will-define-the-security-strategies-of-52187314.aspx">In this paper you will define the security strategies of</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_3">network security paperin this paper you will define the security strategies of defense in depth and layered security</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_4" class="studenthdname" href="https://www.tutorsglobe.com/question/create-the-classes-phonebook-school-and-student-you-will-52187315.aspx">Create the classes phonebook school and student you will</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_4">projectschoolstudent phonebookyour task is to create the classes school student and phonebook such that the following</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_5" class="studenthdname" href="https://www.tutorsglobe.com/question/discount-refuses-and-a-b-and-c-refuse-to-sell-to-discount-52187316.aspx">Discount refuses and a b and c refuse to sell to discount</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_5">discount is a discount appliance chain store that continually sells goods at a price below manufacturers suggested</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_6" class="studenthdname" href="https://www.tutorsglobe.com/question/compare-and-contract-kohlbrergs-model-of-moral-development-52187317.aspx">Compare and contract kohlbrergs model of moral development</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_6">you need someone has read a book applied professional ethics a develppmental approach for use w case studies by gregory</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_7" class="studenthdname" href="https://www.tutorsglobe.com/question/which-molecule-contains-the-genetic-information-that-is-52187318.aspx">Which molecule contains the genetic information that is</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_7">which molecule contains the genetic information that is transmitted hereditarily and which controls cellular</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_8" class="studenthdname" href="https://www.tutorsglobe.com/question/what-are-some-examples-of-human-cells-that-produce-proteins-52187319.aspx">What are some examples of human cells that produce proteins</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_8">what are some examples of human cells that produce proteins for</span></p> </div> <!-- /comment-box --> </li> </td> </tr> </table> </ul> <!-- /user-comments-list --> </div> </div> <div class="col-md-4 col-xs-12 login-area innerpage"> <div class="row"> <div class="details col-md-12"> <div class="col-md-4"> <div class="circle orange"> <i class="fa fa-question"></i> </div> <p> 1952277 </p> <p> Questions<br /> Asked</p> </div> <div class="col-md-4"> <div class="circle yellow"> <i class="fa fa-user-secret"></i> </div> <p> 3,689</p> <p> Active Tutors</p> </div> <div class="col-md-4"> <div class="circle green"> <i class="fa fa-thumbs-o-up"></i> </div> <p> 1448073</p> <p> Questions<br /> Answered</p> </div> <p><b> Start Excelling in your courses, Ask a tutor for help and get answers for your problems !! </b></p> <a href="https://www.tutorsglobe.com/post-your-job-for-free.aspx" class="btn btn-primary btn-lg mar_top10">ask Question</a> </div> </div> <div class="row"> <div class="user-comments-area hidden-xs"> <hr /> <h4 class="text-uppercase mar_btm20"> <i class="fa fa-question-circle"></i> Asked Questions</h4> <hr /> <ul class="user-comments-list"> <table id="dlNewReviews" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_0" class="studenthdname" href="https://www.tutorsglobe.com/question/what-options-is-true-in-relation-to-validity-53424088.aspx">What options is true in relation to validity</a></h5> <p> <span id="dlNewReviews_lblReviews_0">Question: Which of the following options is true in relation to validity? Question Select one:</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_1" class="studenthdname" href="https://www.tutorsglobe.com/question/competence-and-confidence-when-imagining-or-engaging-53424100.aspx">Competence and confidence when imagining or engaging</a></h5> <p> <span id="dlNewReviews_lblReviews_1">Question: Jarrett generally feels a sense of competence and confidence when imagining or engaging in communication. </span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_2" class="studenthdname" href="https://www.tutorsglobe.com/question/can-you-put-this-in-study-guide-format-53424086.aspx">Can you put this in study guide format</a></h5> <p> <span id="dlNewReviews_lblReviews_2">Can you put this in study guide format: External Validity Sample characteristics Stimulus Characteristics Multiple Treatment Interference </span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_3" class="studenthdname" href="https://www.tutorsglobe.com/question/what-when-a-counselor-asks-a-client-to-pretend-to-interview-53424103.aspx">What when a counselor asks a client to pretend to interview</a></h5> <p> <span id="dlNewReviews_lblReviews_3">When a counselor asks a client to pretend to interview for a job, and the counselor pretends to be an employer, </span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_4" class="studenthdname" href="https://www.tutorsglobe.com/question/comment-on-parenthetical-style-53424083.aspx">Comment on parenthetical style</a></h5> <p> <span id="dlNewReviews_lblReviews_4">Comment on Parenthetical style: "The inclusion of plants in an indoor environment may positively impact our psychological response</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_5" class="studenthdname" href="https://www.tutorsglobe.com/question/why-consciousness-is-an-especially-important-53424102.aspx">Why consciousness is an especially important</a></h5> <p> <span id="dlNewReviews_lblReviews_5">Consciousness is an especially important team member characteristic. Research indicates that mixing highly conscious individuals in a team</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_6" class="studenthdname" href="https://www.tutorsglobe.com/question/introduce-the-instrument-you-are-focusing-on-53424094.aspx">Introduce the instrument you are focusing on</a></h5> <p> <span id="dlNewReviews_lblReviews_6">Introduce the instrument you're focusing on. Provide some background information about it and state why it's important in psychological assessment.</span></p> </div> <!-- /comment-box --> </li> </td> </tr> </table> </ul> </div> </div> </div> </div> </div> </div> </div> <script> var url = 'https://www.tutorsglobe.com/include/javascript/watiWidget.js'; var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url; var options = { "enabled":true, "chatButtonSetting":{ "backgroundColor":"#00e785", "ctaText":"Whatsapp Support!!", "borderRadius":"25", "marginLeft": "0", "marginRight": "20", "marginBottom": "20", "ctaIconWATI":false, "position":"left" }, "brandSetting":{ "brandName":"Tutorsglobe", "brandSubTitle":"Trusted Since 2005", "brandImg":"https://www.tutorsglobe.com/include/images/chat-logo.svg", "welcomeText":"Hi there!\nDo you Need help?", "messageText":"Hello, Tutorsglobe !! I have a question!", "backgroundColor":"#00e785", "ctaText":"Chat with Whatsapp", "borderRadius":"25", "autoShow":false, "phoneNumber":"441416286080" } }; s.onload = function() { CreateWhatsappChatWidget(options); }; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); </script> <footer class="site-footer"> <div class="container"> <div class="footerlinks"> <a href="https://www.tutorsglobe.com/">Home</a> | <a href="https://www.tutorsglobe.com/about-us.aspx">Company Overview</a> | <a href="https://www.tutorsglobe.com/services.aspx">Services</a> | <a href="https://www.tutorsglobe.com/library/">Discover Q&A</a> | <a href="https://www.tutorsglobe.com/sitemap.aspx">Sitemap</a> | <a href="https://www.tutorsglobe.com/contact-us.aspx">Contact Us</a> | <a href="https://www.tutorsglobe.com/terms-and-conditions.aspx">T & C</a> | <a href="https://www.tutorsglobe.com/refundcancelpolicy.aspx">Refund Policy</a> | <a href="https://www.tutorsglobe.com/copyright-infringement-policy.aspx">Copyright Policy</a> | <a href="https://www.tutorsglobe.com/blog/archive/">Blog</a> | <a href="https://www.tutorsglobe.com/library/archive.aspx">Q&A</a> | <a href="https://www.tutorsglobe.com/education-directory.aspx">Directory</a> </div> <p>©TutorsGlobe</a> All rights reserved 2022-2023. </p> <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "product", "name": "Tutorsglobe", "image": "https://www.tutorsglobe.com/IncludeLib/Images/logo.png", "description": "elearning Platform - Tutor Service", "brand": { "@type": "elearning", "name": "Tutorsglobe" }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.9", "ratingCount": "37128" } } </script> <a href="#" class="settings"><i class="fa fa-angle-up"></i></a> <ul class="social-icons"> <li><a href="https://www.facebook.com/TutorsGlobe" rel="nofollow" target="_blank"><i class="fa fa-facebook-square"></i></a></li> <li><a href="https://twitter.com/Tutorsglobe" rel="nofollow" target="_blank"><i class="fa fa-twitter-square"></i></a></li> <li><a href="#" rel="nofollow"><i class="fa fa-youtube-square"></i></a></li> <li><a href="https://www.linkedin.com/company/tutorsglobe" target="_blank" rel="nofollow"><i class="fa fa-linkedin-square"></i></a></li> </ul> </div> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-32333066-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.tutorsglobe.com/IncludeLib/js/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-5E9QFMFDJR"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-5E9QFMFDJR'); </script> </footer> </div> <!-- /pageWrap --> <div class="overlay"> </div> <!-- JavaScript Files ================================================== --> <script type="text/javascript" src="../IncludeLib/js/jquery-1.11.2.min.js"></script> <script type="text/javascript" src="../IncludeLib/js/bootstrap.min.js"></script> <script type="text/javascript" src="../IncludeLib/js/jquery.mCustomScrollbar.concat.min.js"></script> <script type="text/javascript" src="../IncludeLib/js/script.js"></script> <script type="text/javascript" src="../IncludeLib/js/ie10-viewport-bug-workaround.js"></script> <script type="text/javascript"> //<![CDATA[ var Page_Validators = new Array(document.getElementById("RequiredFieldValidator1")); //]]> </script> <script type="text/javascript"> //<![CDATA[ var RequiredFieldValidator1 = document.all ? document.all["RequiredFieldValidator1"] : document.getElementById("RequiredFieldValidator1"); RequiredFieldValidator1.controltovalidate = "txtcomments"; RequiredFieldValidator1.errormessage = "Write atleast 100 words!!"; RequiredFieldValidator1.validationGroup = "Review"; RequiredFieldValidator1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid"; RequiredFieldValidator1.initialvalue = ""; //]]> </script> <script type="text/javascript"> //<![CDATA[ var Page_ValidationActive = false; if (typeof(ValidatorOnLoad) == "function") { ValidatorOnLoad(); } function ValidatorOnSubmit() { if (Page_ValidationActive) { return ValidatorCommonOnSubmit(); } else { return true; } } //]]> </script> </form> </body> </html>