{ "key_pair_value_system": true, "answer_rating_count": "", "question_feedback_html": { "html_star": "", "html_star_feedback": "" }, "answer_average_rating_value": "", "answer_date_js": "2024-09-11T02:13:29-04:00", "answer_date": "2024-09-11 02:13:29", "is_docs_available": "", "is_excel_available": "", "is_pdf_available": "", "count_file_available": 0, "main_page": "student_question_view", "question_id": "10164467", "url": "\/study-help\/questions\/interpolated-strings-optional-and-named-arguments-encoding-html-1create-a-10164467", "question_creation_date_js": "2024-09-11T02:13:29-04:00", "question_creation_date": "Sep 11, 2024 02:13 AM", "meta_title": "[Solved] Interpolated Strings Optional and Named A | SolutionInn", "meta_description": "Answer of - Interpolated Strings Optional and Named Arguments Encoding HTML 1.Create a class called Student. 2.Create auto-impleme | SolutionInn", "meta_keywords": "interpolated,strings,optional,named,arguments,encoding,html,1,create,class,called,student", "question_title_h1": "Interpolated Strings Optional and Named Arguments Encoding HTML 1.Create a class called Student. 2.Create auto-implemented properties for the first name, last name, and state of", "question_title": "Interpolated Strings Optional and Named Arguments Encoding HTML 1.Create a class called", "question_title_for_js_snippet": "Interpolated Strings Optional and Named Arguments Encoding HTML 1 Create a class called Student 2 Create auto implemented properties for the first name, last name, and state of residence Auto generated properties dont have a body public int Quantity get set 3 Create a constructor method for the class that takes 3 parameters 1 for each property first name, last name, and state of residence, IN THAT ORDER For the state of residence parameter, provide a default value of SC if the programmer doesnt supply a value for the state of residence parameter Assign these 3 parameter values to the corresponding properties in the body of the constructor 4 Create a method called StudentInfo that returns a string message similar to the following, but with the name of the student currently stored in the class SC Ben Harper For the output, use an interpolated string (the variables properties should be listed in the quoted literal) 5 Create another method called WriteStudentInfoHTML that outputs an HTML page to a file called StudentInfo html with this information as before SCBen Harper However, the SC should be bold, the hyphen should use an em dash, and the title of the document should be the students first and last names The tags will make text bold An em dash is the decimal Unicode value of 8212 The title of an HTML document appears on the tab of the browser window (the title tag in the HTML) A minimal HTML document should have the following tags (in the correct order and placement) Html (opening and closing) head (opening and closing) meta title (opening and closing) body (opening and closing) Make sure you close the file at the end of the method (Continued) 6 Create a final method called WriteStudentInfoTags that will create an html document that shows the tags used in the previous file an html document with html tags in the body This method should create a new HTML document called StudentInfoTags html, and a title of the students first and last names and the word Tags Ben Harper Tags Write out all tags until the opening body tag Read the StudentInfo html file line by line from the previous method Encode each line to HTML with the WebUtility HtmlEncode() method You will need to use System Net to use the WebUtility class Write out each encoded line into the StudentInfoTags html file body tag, and end each line with a tag, to tell a browser that this this is a new line Close the body tag and any other open tags in the StudentInfoTags html file Make sure you close both files when done 7 Finally, write a program (either console or WinForms) that Asks the user for a first and last name only Creates a student object by passing ONLY the last and first names, and IN THAT EXACT ORDER (Dont pass a state to the objects constructor) You will have to use named arguments to accomplish this Calls the StudentInfo method and outputs it to the screen Calls the WriteStudentInfoHTML method Calls the WriteStudentInfoTags method You should be able to double click on the 2 html documents, and they should open up in the default browser Verify that StudentInfo html file shows the state in bold, and the em dash between the state and name Verify that the StudentInfoTags html file shows the tags from the document Sample output from a console program and files follows ", "question_description": "

Interpolated Strings<\/p>

Optional and Named Arguments<\/p>

Encoding HTML<\/p>

1.Create a class called Student.<\/p>

2.Create auto-implemented properties for the first name, last name, and state of residence. Auto-generated properties dont have a body.<\/p>

public int<\/p>

Quantity { get; set; };<\/p>

3.Create a constructor method for the class that takes 3 parameters: 1 for each property: first name, last name, and state of residence, IN THAT ORDER. For the state of residence parameter, provide a default value of SC if the programmer doesnt supply a value for the state of residence parameter. Assign these 3 parameter values to the corresponding properties in the body of the constructor.<\/p>

4.Create a method called StudentInfo that returns a string message similar to the following, but with the name of the student currently stored in the class: SC-Ben Harper<\/p>

For the output, use an interpolated string (the variables\/properties should be listed in the quoted literal).<\/p>

5.Create another method called WriteStudentInfoHTML<\/p>

that outputs an HTML page to a<\/p>

file called StudentInfo.html with this information as before: SCBen Harper<\/p>

However, the SC should be bold, the hyphen should use an em dash, and the title of the document should be the students first and last names. The ...<\/b> tags will make text bold. An em dash is the decimal Unicode value of 8212. The title of an HTML document appears on the tab of the browser window (the title tag in the HTML).<\/p>

A minimal HTML document should have the following tags (in the correct order and placement):<\/p>

<\/p>

Html (opening and closing)<\/p>

head (opening and closing)<\/p>

meta<\/p>

title (opening and closing)<\/p>

body (opening and closing)<\/p>

Make sure you close the file at the end of the method.<\/p>

(Continued)<\/p>

6.Create a final method called WriteStudentInfoTags that will create an html document that shows the tags used in the previous file...an html document with html tags in the body.<\/p>

This method should create a new HTML document called StudentInfoTags.html, and a title of the students first and last names and the word Tags: Ben Harper Tags<\/p>

Write out all tags until the opening body tag<\/p>

Read the StudentInfo.html file line-by-line from the previous method.<\/p>

Encode each line to HTML with the WebUtility.HtmlEncode() method. You will need to use System.Net to use the WebUtility class.<\/p>

Write out each encoded line into the StudentInfoTags.html file body tag, and end each line with a
tag, to tell a browser that this this is a new line.<\/p>

Close the body tag and any other open tags in the StudentInfoTags.html file. Make sure you close both files when done.<\/p>

7. Finally, write a program (either console or WinForms) that<\/p>

Asks the user for a first and last name only<\/p>

Creates a student object by passing ONLY the last and first names, and IN THAT EXACT ORDER. (Dont pass a state to the objects constructor). You will have to use<\/p>

named arguments to accomplish this.<\/p>

Calls the StudentInfo method and outputs it to the screen<\/p>

Calls the WriteStudentInfoHTML method<\/p>

Calls the WriteStudentInfoTags method<\/p>

You should be able to double-click on the 2 html documents, and they should open up in the default browser.<\/p>

Verify that StudentInfo.html file shows the state in bold, and the em dash between the state and name.<\/p>

Verify that the StudentInfoTags.html file shows the tags from the document.<\/p>

Sample output from a console program and files follows.<\/p>", "transcribed_text": "", "related_book": { "title": "Practical Issues In Database Management A Refernce For The Thinking Practitioner", "isbn": "0201485559, 978-0201485554", "edition": "1st Edition", "authors": "Fabian Pascal", "cover_image": "https:\/\/dsd5zvtm8ll6.cloudfront.net\/si.question.images\/book_images\/650976ff6ba08_55597.jpg", "uri": "\/textbooks\/practical-issues-in-database-management-a-refernce-for-the-thinking-practitioner-1st-edition-9780201485554", "see_more_uri": null }, "question_posted": "2024-09-11 02:13:29", "step_by_step_answer": "The Answer is in the image, click to view ...", "students_also_viewed": [ { "url": "\/study-help\/industrial-organizational-psychology-understanding-the-workplace\/4-how-might-the-gradual-loss-of-olfactory-sensitivity-affect-1995142", "description": "4. How might the gradual loss of olfactory sensitivity affect the eating habits of seniors?", "stars": 0 }, { "url": "\/for-roche-inc-variable-manufacturing-overhead-costs-are-expected-to", "description": "For Roche Inc., variable manufacturing overhead costs are expected to be $20,000 in the first quarter of 2012, with $4,000 increments in each of the remaining three quarters. Fixed overhead costs are...", "stars": 3 }, { "url": "\/study-help\/questions\/interpolated-strings-optional-and-named-arguments-encoding-html-1create-a-10164467", "description": "Interpolated Strings Optional and Named Arguments Encoding HTML 1.Create a class called Student. 2.Create auto-implemented properties for the first name, last name, and state of residence....", "stars": 3 }, { "url": "\/study-help\/questions\/un-contratista-construy-una-casa-para-revenderla-que-se-vendide-1650930", "description": "Un contratista construy una casa para revenderla, que se vendide inmediato. A efectos fiscales, este es un ejemplo dea) rentas de capital.B) renta empresarial.C) otros ingresos.D) Renta de la 1 answer", "stars": 3 }, { "url": "\/study-help\/questions\/you-are-a-chairperson-of-source-selection-evaluation-board-for-1207446", "description": "You are a chairperson of source selection, evaluation board for a new jet engine. You had to brief a SSEB member on the procedures for protecting source selection, information what procedures would...", "stars": 3 }, { "url": "\/study-help\/questions\/plastex-corporation-is-considering-expanding-but-wishes-to-control-5570303", "description": "3. Plastex Corporation is considering expanding but wishes to control growth by imposing a limit on capital on capital expenditures of $500,000. The capital investment opportunities are: +...", "stars": 3 }, { "url": "\/study-help\/questions\/read-this-case-and-just-answer-question-1-and-2-4198081", "description": "Read this case, and just answer question 1 and 2, do not need to answer the rest of questions. 1.For HTC's hardware product revenue stream, what is the distinguishing factor that should be considered...", "stars": 3 }, { "url": "\/study-help\/questions\/pharmaceutical-benefits-managers-pbms-are-intermediaries-between-upstream-drug-manufacturers-4970333", "description": "Pharmaceutical Benefits Managers (PBMs) are intermediaries between upstream drug manufacturers and downstream insurance companies. They design formularies (lists of drugs that insurance will cover)...", "stars": 3 }, { "url": "\/study-help\/questions\/9-javon-company-set-standards-of-2-hours-of-direct-7295665", "description": "9 3 points 03:02:45 Skipped Javon Company set standards of 2 hours of direct labor per unit at a rate of $15.10 per hour. During October, the company actually uses 11,000 hours of direct labor at a...", "stars": 3 } ], "next_back_navigation": { "previous": "\/study-help\/questions\/exercise-178-exercise-178-using-the-plantwide-overhead-rate-to-10164466", "next": "\/study-help\/questions\/warrants-maese-industries-inc-has-warrants-outstanding-that-permit-the-10164468" }, "breadcrumbs": [ { "name": "Study help", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers" }, { "name": "Computer Science", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers\/computer-science" }, { "name": "Databases", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/computer-science-databases" }, { "name": "Interpolated Strings Optional and Named Arguments Encoding HTML 1.Create a class called", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/interpolated-strings-optional-and-named-arguments-encoding-html-1create-a-10164467" } ], "skill_details": { "skill_id": "656", "skill_name": "Databases", "parent_id": "8" } }