complete c# program

User Generated

onfobfn

Programming

Description

hey, i have started a program in c# and i need help complete it please.

attached is my work with the word document that show the requirements and finally the result that need to show.



I will provide an example that we had so it help you solve the program

Unformatted Attachment Preview

Titanic Passengers - Solution 3rd - All Sexes - Children Name Abbott, Master Eugene Joseph Abbott, Mr Rossmore Edward Abelseth, Miss Anna Karen Aks, Master Philip Allum, Mr Owen George Andersson, Miss Ebba Iris Andersson, Miss Ellis Anna Maria Andersson, Miss Erna Andersson, Miss Ingeborg Constancia Andersson, Miss Sigrid Elizabeth Andersson, Master Sigvard Harald Elias Asplund, Master Carl Edgar Asplund, Master Clarence Gustaf Hugo Aspland, Master Edvin Rojj Felix Asplund, Master Filip Oscar Asplund, Miss Lillian Gertrud Attalah, Miss Malaka Baclini, Miss Eugenie Banoura, Miss Ayout Boulos, Master Akar Boulos, Miss Laura Calic, Mr Peter Carr, Miss Helen Coutts, Master Neville Coutts, Master William Leslie Cribb, Miss Laura Alice Danbom, Master Gilbert Sigvard Emanuel Davies, Mr Joseph Age 13.0 16.0 16.0 0.8 17.0 6.0 2.0 17.0 9.0 11.0 4.0 5.0 9.0 3.0 13.0 5.0 17.0 3.0 15.0 6.0 9.0 17.0 16.0 3.0 9.0 17.0 0.3 17.0 Class 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd Sex male male female male male female female female female female male male male male male female female female female male female male female male male female male male Survived No No Yes Yes No No No Yes No No No No No Yes No Yes No Yes Yes No No No Yes Yes Yes Yes No No Name Dean, Master Bertram Vere Dean, Miss Elizabeth Gladys (Millvena) Eklund, Mr Hans Linus Emanuel, Miss Virginia Ethel Ford, Miss Maggie Ford, Mr Neil Watson Gilnagh, Miss Katie Goldsmith, Master Frank John William Goodwin, Mr Charles E. Goodwin, Miss Lillian A. Goodwin, Master Harold V. Goodwin, Miss Jessie A. Goodwin, Master Sidney L. Goodwin, Master William F. Survival rate: 38.1% Age 1.0 0.2 16.0 5.0 9.0 16.0 16.0 9.0 14.0 16.0 9.0 10.0 6.0 11.0 Class 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd 3rd Sex male female male female female male female male male female male female male male Survived Yes Yes No Yes No No Yes Yes No No No No No No Assignment 8: Titanic Overview You’ll create a program that will allow the user to see information about passengers aboard the Titanic. The application should consist of three combo boxes so the user can choose which passengers they would like information about. It should also have three buttons for printing: Page Setup, Print Preview, and Print. The work for each section should be done in your program (you should not be creating queries, either in the database, or within your program for the database to run. You also should not use LINQ, which behaves a lot like queries—use for loops, lists, etc. to do the work instead). Each step should work, even if any information in the database is changed. You should print the results using the PrintDialog, PrintDocument, and related Windows Forms controls. Application Design You will use the database Titanic.mdb (available on Canvas) to complete this project. It contains information about the 1313 passengers that were aboard the Titanic (crew members are not included in the database). Your form should have three combo boxes: the first is for class—this should include First, Second, Third or All. The second is for Sex, which should include Female, Male, or All. The third is for Age, which should include Child, Adult, Unknown, or All. Child should show all passengers whose age is known and are under 18, Adult should show all passengers whose age is known and are 18 and over, and unknown should only include passengers whose age is not known. When the user prints, the program should print all passengers who meet the criteria, with the report format described below. Page Setup and Print Preview should work as expected. Report Format The printout should have a header that appears on the first page only and includes your name, for example “Titanic Passengers - Biff” in larger font at the top. On the next line, it should give the criteria, such as “All Classes – Male - Adult” This can be in whatever font you feel looks best. Below that should be a header for the columns, in bold. The column headers should be displayed on under the report header on the first page, and then on the other pages at the top. Below the column headers, each passenger’s information should be printed out. This should include the name, age, class, sex, and survival. If age is not known, list show a dash (“-“) under the age column. Survival should be listed as either Yes or No. Finally, at the very end of the report (just once—not on each page), there should be a survival percentage for all of the passengers in the report: “Listed passengers survival rate: 34%” The columns should fit across a typical width in landscape view (for example, 1 inch margins). If the user changes the page settings to make the width too small to fit the columns on a page, you do not need to wrap the line—instead, the text should be clipped so that the margins are correct, although some information may be lost. If there are many passengers in the report, you will need to print multiple pages to display them all. Notes A couple of things to highlight with the assignment: - Be aware of capitalization with your values. The database has sex in all lower-case letters, so if you use == to compare it to a dropdown with capital letters, it will appear that nobody matches. You can have your dropdown in all lower-case letters, or compare them in a case-insensitive way (for example, there is a version of .Equals that ignores case). - If a value is null in the database (meaning the information isn’t there), it actually returns a special DBNull rather than our standard null. You can use DBNull.Value to see if something is null in the database: if (row[“Room”] == DBNull.Value) . . . Name, Class, Sex, and Survived have values for every person in the database, so you only need to worry about Age possibly being null. Code Readability As with all assignments this semester, your code should be easily readable. The code should have a set of comments at the top, noting your name, the assignment number, and a brief description of the program. All variables should be named appropriately: given a brief, descriptive name. The only exceptions should be loop variables which may be named i, j, etc. Lastly, each independent piece of code should have a brief comment describing it. This means that every method, loop, and if statement should have at least one comment, describing what it does. Complex sections of code may need additional comments. You should also submit the printout from running the program with: - First class female children Form1 O х Class 3rd Sex All Age Children Page Setup Print Preview Print
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello, I have done the code and here is a sample output from the program as well as a print preview screen.

Titanic Passengers - BBBBBB

2nd - Child - All

Name
Becker, Master Richard F.
Becker, Miss Ruth Elizabeth
Brown, Miss Edith E.
Caldwell, Master Alden Gates
Collyer, Miss Marjorie
Davis, Master ...


Anonymous
Great! 10/10 would recommend using Studypool to help you study.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags