C# Assignment Lab 1

Assignment's Price
$30

Order Description

Lab #1

Requirements

1)Several Students can rent one and only one Property. A property may include many Students. 2)You will need to create a separate class for a Student that includes an array of objects. All inserting of the Students will use this class and no I/O or SQL statements will be included in this class. 3)You will need to create a separate class for a Property. All inserting of a Property will use this class and no I/O or SQL statements will be included in this class.. Any other table must include a separate class for all inserting of that table. 4)A Renter owns many properties but only one renter owns a property. A Renter has a name and address. You will need to create another class for this table. The processing for this table will not be included in Lab 1. 5)You must model the database to capture monthly payments and the date that one was paid. Be sure to include other important fields. The processing for this table(s) will not be included in Lab 1. 6)Create other classes as needed. 7)You will design the following interface and processes for the Student: a.When you program runs initially, it will NOT delete any information in any of your tables. You should NOT use a SQL Create or Drop statement anywhere in your program. You should run the create statements to create the tables in SQL Server prior to running your application. I will run my SQL Create/initial insert statements before I test your program. There is no reason why our SQL statements should not be virtually the same. If your program does not run against my SQL, you will need to modify your code in order to get it to run and update the database (with a 20% penalty). b.You may NOT insert any records into the Property table in any way at any time once your program starts for Lab 1 (you may update a foreign key if it exists). For testing purposes you will need to add some records into the Property table but I will add my own. c.Your program should allow a user to insert multiple Students and associated records. A user will enter the data for a new Student in the relevant textboxes and drop downs. When the “Insert” button is selected, the program will verify that someone by that same name does not already exist in the Student array of objects (it does not matter if they are in the database or not). If the Student does not exist, all of their data will be added into the array. In this case, their age will appear in an un-editable area. If the name does exist in the array, then an error message will appear and the Student data will not be added. In either case the data in the textbox will remain there unless the “Clear” button is selected (the database or array is not modified in any way here). When the user selects the “Commit” button, all of the data in the array will be inserted into the Student table and any other necessary tables (be sure to consider the cascading effect). You must use a constant for the size of the array. Set the constant value to three and verify that no more than three records can be added to the array (or the current size of the constant). If the maximum size of the array is going to be exceeded, a message must appear stating that fact. When you commit your array to go into the database, all of the existing records except for the one with the highest value in the primary key in the Student table must be deleted before doing so (this is the only SQL Delete that will exist for this lab). After the commit, the contents of your Student array and the form input boxes need to be cleared. d.An “Exit” button will close the application. e.A “Populate button” will place valid data into every field. f.States can only exist for the US. g.Make sure the unique Properties appear in a drop-down list. The information in this list does not need to be updated into the database for this lab. h.Make sure that your data is validated and use Try/Catch as needed. i.Your SQL Server DB must be called Lab1 and the server must be called LocalHost. j.Your program MUST run against the standard database ERD and data definitions in order to be graded. k.Your name should appear in the title of your webpage and in the comments of your files and in the main body of your form. 8)Your programs should have no error or informational compile errors or warnings. 9)You must use the gets/sets as described in your class constructors.

Quality of Code

I will judge your programs both by how well they work, and based on the elegance of the code. The code should be well-documented and efficient. Proper indentation, descriptive variable names, and comments are essential. No extraneous variables or extra unnecessary lines of code. You must include your name and the honor code pledge near the top of all of your files.

Deliverables Provide a meaningful name to your files. When completed, you will zip your Web Site folder and submit that into Canvas by the deadline (this will include all of the files required). Be sure to test all of your labs in Burrus /Showker before you submit them to be graded in Canvas. You will be penalized three points for every time your program does not run for the Instructor/Graduate Assistant (unless it was not an error caused by you).