Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DOT NET Expert

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="http://sharing.mywordsolution.com/XtringFiles/991_Project.pdf" target="_blank">Project.pdf</a></p></span> </div></div></div> <div id="viewreadmore" class="que_link"> <a id="readmore" href="javascript:void(0);" style="font-size: 14px; color: #ff700c;" class="read-more-trigger mar_top10" onclick="changeheight(this)">View complete question</a> </div> <div class="innercanteenouter_inner_center3"> <p>DOT NET, <span>Programming</span> </p> </div> <div class="clear"></div> </div> </div> <div class="innercanteenouter_inner_center6"> <div class="innercanteenouter_inner_center6_center7"> <div class="innercanteenouter_inner_center6_center"> <ul> <li class="innercanteenouter1"> Category:- <span>DOT NET</span> </li> <li class="innercanteenouter2"> Reference No.:- <span>M92200486 </span> </li> </ul> <div class="clear"></div> <input type="submit" name="btnASolution" value="Order Now to Get Expert's Answer" id="btnASolution" class="innercanteenouter_inner_center6_center2" /> </div> <div class="innerjohnanswered1"> <div class="innerjohnanswered1ftti"><h2></h2> <p></p> </div> <div class="clear"></div> </div> </div> </div> <div class="inneranswer"> <b>Have any Question?</b><span id="RequiredFieldValidator1" style="background-color:Yellow;visibility:hidden;">Write your Review or question?</span> <br /><br /> <div class="inneranswerhgrows"> <textarea name="txtReview" id="txtReview" class="inneranswerhgrowss" ValidationGroup="Review" placeholder=" Write your message!!"></textarea> </div> <div class="inneranswerhgrowsddf"> <input type="submit" name="btnReview" value="Have Question" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnReview", "", true, "Review", "", false, false))" id="btnReview" class="planpageinnerrightcontleftcommetgetquotebt" /> </div> </div> <br /> <div class="innerquestions"> <h2>Related Questions in DOT NET</h2> <table id="dlReviewList" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_0"><b><a href='http://www.mywordsolution.com/question/scenariouser-modelling-inc-would-like-to-organize-a-series/93111517' target='_balnk' class='que_link' >Scenariouser modelling inc would like to organize a series</a></b></span></h3> <p> <span id="dlReviewList_lblContent_0">Scenario User Modelling Inc. would like to organize a series of conferences focusing on research topics in the area of user adaptive systems and personalization. They need to organize annual conferences for researchers a ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_1"><b><a href='http://www.mywordsolution.com/question/summarythis-assessment-requires-you-to-develop-a-simple/93131060' target='_balnk' class='que_link' >Summarythis assessment requires you to develop a simple</a></b></span></h3> <p> <span id="dlReviewList_lblContent_1">Summary This assessment requires you to develop a simple text editor with a basic offline user login. It is a windows application that will allow new uses to be added, existing users to login, and to create/save/edit tex ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_2"><b><a href='http://www.mywordsolution.com/question/casewe-sell-pdfs-from-our-site-and-pdfs-can-be-ordered-from/93125107' target='_balnk' class='que_link' >Casewe sell pdfs from our site and pdfs can be ordered from</a></b></span></h3> <p> <span id="dlReviewList_lblContent_2">Case We sell pdf''s from our site and pdfs can be ordered from the site by selecting a book, putting it in a shopping cart, then signing in with a password or as a guest, and then checking out. For some reason, when a pu ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_3"><b><a href='http://www.mywordsolution.com/question/assignment-specificationthis-assignment-is-split-into-two/93103526' target='_balnk' class='que_link' >Assignment specificationthis assignment is split into two</a></b></span></h3> <p> <span id="dlReviewList_lblContent_3">ASSIGNMENT SPECIFICATION This assignment is split into two documents. 1. Assignment Specification. This document contains the specification for what you will be required to do. 2. Assignment Addendum. This document conta ...</span> </p> </div> </td> </tr><tr> <td></td> </tr> </table> </div> <div class="innerlogo"> <ul> <li><div class="innerlogoback1"></div></li> <li><div class="innerlogoback2"></div></li> <li><div class="innerlogoback3"></div></li> </ul> </div> </div> <div class="innercanteenouter_inner_right"> <div class="innercanteenouter_inner_right1"> <div class="innercanteenouter_inner_right1pou"> <ul> <li class="red1"> <div class="counterDivTag">4,153,160 Questions Asked</div> </li> <li class="oring1"><div class="counterDivTag">13,132 Experts</div></li> <li class="grine1"><div class="counterDivTag">2,558,936 Questions Answered</div></li> </ul> <div class="clear"></div> <h2>Ask Experts for help!!</h2> </div> </div> <div class="innerchoose"> <h2>Looking for Assignment Help?</h2> <p> <b>Start excelling in your Courses, Get help with Assignment</b><br /><br /> Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time. </p> <a href="http://www.mywordsolution.com/free-quote-job-posting.aspx">Ask Now</a> <span>Help with Problems, Get a Best Answer</span> </div> <div class="innertranspoitation"> <div class="innertranspoitation1"> <ul> <li><a href="#">Recent Questions </a></li> </ul> <div class="clear"></div> </div> <table id="LeftSideControl1_RecentQuestion1_dlReviewList" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_0"><b><a href='http://www.mywordsolution.com/question/why-might-a-bank-avoid-the-use-of-interest-rate-swaps-even/93137978' target='_balnk' class='que_link' >Why might a bank avoid the use of interest rate swaps even</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_0">Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_1"><b><a href='http://www.mywordsolution.com/question/describe-the-difference-between-zero-coupon-bonds-and/93137977' target='_balnk' class='que_link' >Describe the difference between zero coupon bonds and</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_1">Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_2"><b><a href='http://www.mywordsolution.com/question/compute-the-present-value-of-an-annuity-of--880-per-year/93137976' target='_balnk' class='que_link' >Compute the present value of an annuity of 880 per year</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_2">Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_3"><b><a href='http://www.mywordsolution.com/question/compute-the-present-value-of-an-1150-payment-made-in-ten/93137975' target='_balnk' class='que_link' >Compute the present value of an 1150 payment made in ten</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_3">Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_4"><b><a href='http://www.mywordsolution.com/question/compute-the-present-value-of-an-annuity-of--699-per-year/93137974' target='_balnk' class='que_link' >Compute the present value of an annuity of 699 per year</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_4">Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As</span> </p> </div> </td> </tr><tr> <td></td> </tr> </table> </div> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> </div> <div class="footer"> <div class="footerouter"> <div class="footerouter_inner"> <div class="footerouter_left"> <ul> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/science/8">Science</a></li> <li><a href="http://www.mywordsolution.com/homework-help/english/390">English</a></li> <li><a href="http://www.mywordsolution.com/homework-help/biology/384">Biology</a></li> <li><a href="http://www.mywordsolution.com/homework-help/humanities/388">Humanities</a></li> </ul> </div> </li> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/engineering/9">Engineering</a></li> <li><a href="http://www.mywordsolution.com/homework-help/programming/10">Programming</a></li> <li><a href="http://www.mywordsolution.com/homework-help/computer-science/11">Computers/IT Courses</a></li> </ul> </div> </li> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/accounting/1">Accounting</a></li> <li><a href="http://www.mywordsolution.com/homework-help/finance/2">Finance</a></li> <li><a href="http://www.mywordsolution.com/homework-help/management/7">Management</a></li> <li><a href="http://www.mywordsolution.com/homework-help/statistics/6">Statistics</a></li> <li><a href="http://www.mywordsolution.com/homework-help/economics/5">Economics</a></li> <li><a href="http://www.mywordsolution.com/homework-help/taxation/4">Taxation</a></li> <li><a href="http://www.mywordsolution.com/homework-help/law/3">LAW Assignment Help</a></li> </ul> </div> </li> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/essay/13">Essay Writing Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help/dissertation/12">Dissertation Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help/thesis-writing/117">Thesis Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help/literature-review/79">Literature Review</a></li> <li><a href="http://www.mywordsolution.com/homework-help/research-paper/78">Research Paper</a></li> <li><a href="http://www.mywordsolution.com/homework-help/solved-classroom-assignments/77">Solved Problems</a></li> <li><a href="http://www.mywordsolution.com/homework-help/popular-courses-and-coursework-help/82 ">Coursework Help</a></li> </ul> </div> </li> <div class="clear"></div> </li> </ul> </div> <div class="footerouter_right"> <div class="footerouter_right0"> <div class="footerpayment"> <div class="footerpaymentscur"></div> <div class="footerpaymentscard"> <ul> <li class="footerpaymentscard1"></li> <li class="footerpaymentscard2"></li> <li class="footerpaymentscard3"></li> <li class="footerpaymentscard4"></li> </ul> </div> </div> <div class="footerouter_right1"> <h2>Follow Us</h2> <ul> <li class="fb"><a href="http://www.facebook.com/Mywordsolution" rel="nofollow" target="_blank"></a></li> <li class="twt"><a href="http://www.twitter.com/Mywordsolution" rel="nofollow" target="_blank"></a></li> </ul> <div class="clear"></div> </div> </div> </div> <div class="clear"></div> </div> </div> <div class="footerbottom"> <div class="footerbottom_inner"> <ul> <li><a href="http://www.mywordsolution.com/">Home</a></li> <li><a href="http://www.mywordsolution.com/about-us.aspx">About Us</a></li> <li><a href="http://www.mywordsolution.com/blog/">Blog</a></li> <li><a href="http://www.mywordsolution.com/faqs.aspx">FAQs</a></li> <li><a href="http://www.mywordsolution.com/ask-question.aspx">Assignment Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help.aspx">Homework Help</a></li> <li><a href="http://www.mywordsolution.com/contactus.aspx">Contact Us</a></li> <li><a href="http://www.mywordsolution.com/questions/archive/">Q&A</a></li> <li><a href="http://www.mywordsolution.com/directory.aspx">Directory</a></li> <li><a href="http://www.mywordsolution.com/sitemap.aspx">Sitemap</a></li> <li><a href="http://www.mywordsolution.com/refund-policy.aspx">Refund Policy</a></li> <li><a href="http://www.mywordsolution.com/privacy-policy.aspx">Privacy Policy</a></li> <li><a href="http://www.mywordsolution.com/terms-and-conditions.aspx">T & C </a></li> <li><a href="http://www.mywordsolution.com/disclaimer-policy.aspx">Disclaimer Policy</a></li> <li> <a href="http://www.mywordsolution.com/copyright-notice.aspx">Copyright Notice</a></li> </ul> <div class="clear"></div> <p>© Copyright 2013-14 <span>mywordsolution.com</span> All rights reserved </p> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-38762144-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') + '.mywordsolution.com/library/js/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <!--Start of Tawk.to Script--> <script type="text/javascript"> var $_Tawk_API={},$_Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0]; s1.async=true; s1.src='https://embed.tawk.to/5584638c0ed4869955a0dce2/default'; s1.charset='UTF-8'; s1.setAttribute('crossorigin','*'); s0.parentNode.insertBefore(s1,s0); })(); </script> <!--End of Tawk.to Script--> </div> </div> </div> <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 = "txtReview"; RequiredFieldValidator1.errormessage = "Write your Review or question?"; 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>