<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3690756888096802857</id><updated>2011-04-22T12:13:10.825+08:00</updated><category term='inheritance'/><category term='reports'/><category term='exercises'/><category term='resources'/><category term='arrays'/><category term='exams'/><category term='data access'/><category term='class'/><category term='forms'/><category term='regular expressions'/><category term='finals'/><category term='collections'/><category term='solutions'/><category term='basics'/><category term='samples'/><category term='notes'/><title type='text'>.NET Starter</title><subtitle type='html'>Exercises, notes and resources for the IT311 course</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetstarter.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-4314951001018364762</id><published>2007-10-18T09:05:00.000+08:00</published><updated>2007-11-11T20:54:21.032+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='finals'/><title type='text'>Final Project Presentation</title><content type='html'>Presentation for the final project will be on October 19, Friday at Rm 308, DR2 and will start at 8:30AM.&lt;br /&gt;&lt;br /&gt;Each group will be given 20 minutes starting with the first group from IT3A.   The order of the presentation is arranged alphabetically based on the first member of the group as follows:&lt;br /&gt;&lt;br /&gt;IT3A:&lt;br /&gt;1.  Alcoberes, et. al.&lt;br /&gt;2.  Arinto, et. al.&lt;br /&gt;3.  Barriga, et. al.&lt;br /&gt;4.  Basas, et. al.&lt;br /&gt;5.  Claro, et. al.&lt;br /&gt;6.  Gaanan, et. al.&lt;br /&gt;7.  Gio, et. al.&lt;br /&gt;&lt;br /&gt;IT3B:&lt;br /&gt;8.  Abello, et. al.&lt;br /&gt;9.  Alay, et. al.&lt;br /&gt;10.  Albores, et. al.&lt;br /&gt;11.  Carado, et. al.&lt;br /&gt;12.  Co, et. al.&lt;br /&gt;13.  Deocampo, et. al.&lt;br /&gt;14.  Donayre, et. al.&lt;br /&gt;15.  Frigillano, et. al.&lt;br /&gt;16.  Masudo, et. al.&lt;br /&gt;17.  Polancos, et. al.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-4314951001018364762?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4314951001018364762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4314951001018364762'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/10/final-project-presentation.html' title='Final Project Presentation'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-5328887657800048220</id><published>2007-10-17T09:44:00.000+08:00</published><updated>2007-11-11T20:54:49.063+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='resources'/><category scheme='http://www.blogger.com/atom/ns#' term='reports'/><title type='text'>Using Crystal Reports</title><content type='html'>For those who are having problems with integrating Crystal Report in their applications, check this out:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.crystalreportsbook.com/CrystalReportsXI.asp"&gt;http://www.crystalreportsbook.com/CrystalReportsXI.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-5328887657800048220?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/5328887657800048220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/5328887657800048220'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/10/using-crystal-reports.html' title='Using Crystal Reports'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-3743459955692402305</id><published>2007-10-12T12:29:00.000+08:00</published><updated>2007-11-11T20:53:18.567+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='data access'/><title type='text'>Sample Codes: Data Access (2)</title><content type='html'>This sample improves the previous one by delegating all data access functions to a separate class named &lt;span style="font-family:courier new;"&gt;DBHelper&lt;/span&gt;.  This also implements row filtering using the &lt;span style="font-family:courier new;"&gt;DefaultView &lt;/span&gt;property of a &lt;span style="font-family:courier new;"&gt;DataTable&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/DatabaseEx02.zip"&gt;Download Code&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This sample uses an MS Access database for persistent storage and adds reporting capabilities.  This uses a different approach to retrieving and updating data by extending the &lt;span style="font-family:courier new;"&gt;DataSet&lt;/span&gt; class.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/Demo.zip"&gt;Download Code&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To run both applications, set the ConnectionString value of the App.config file to the correct path of the databases.  For the second example, Crystal Studio should be installed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-3743459955692402305?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3743459955692402305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3743459955692402305'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/10/sample-codes-data-access-2.html' title='Sample Codes: Data Access (2)'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-3572627964044561517</id><published>2007-09-20T18:10:00.000+08:00</published><updated>2007-09-24T22:31:41.259+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='notes'/><category scheme='http://www.blogger.com/atom/ns#' term='data access'/><title type='text'>Sample Code and Slide: Data Access</title><content type='html'>This sample uses the SQL provider to retrieve and manipulate data in an attached database (SQLExpress).   This also demonstrates binding data to DataGridView and ComboBox controls.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;To run the application, edit the AttachDbFilename value in the App.config file to point to the correct path of the database file.  You can also copy the mdf/ldf files to a fixed location, e.g. "C:\", and set your AttachDbFilename value to "C:\Purchasing.mdf"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/DatabaseEx.zip"&gt;Download Code&lt;/a&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/CSharp%20Data%20Access.ppt"&gt;Download Powerpoint Presentation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-3572627964044561517?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3572627964044561517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3572627964044561517'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/09/sample-code-and-slide-data-access.html' title='Sample Code and Slide: Data Access'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-30483587130005526</id><published>2007-09-12T14:50:00.000+08:00</published><updated>2007-09-17T19:41:53.619+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='finals'/><title type='text'>Final Program: Forms</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Instruction: Submit t&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;his exercise on September 19, Wednesday.  &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Compress the whole project located at "&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;My Documents Path&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;\Visual Studio 2005\Projects\&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Project Name&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;" (default) or at the location you specified.  Upload this file to ELMS.  Also include the database design for your final project.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Continuing from exercise #8, create additional forms (a minimum of 3) for the transactions that your application will support.  Each form should contain all fields necessary to process its corresponding transaction and should provide validation of its fields.&lt;br /&gt;&lt;br /&gt;As an example, consider a Loans Management System which allows a group or a company to monitor all member loans.  Possible transactions identified can include the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Loan Application - form to process member loan applications.  Fields can include the transaction date, loan status, member information, loan type, loan cycle, loan amount, interest, mode of payment (monthly, weekly, etc) and terms of payment.  Validation can be applied to numeric types like loan cycle, loan amount, and interest.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Loan Release - form to process loan disbursements.  Fields can include the release date, loan status, and authorizing officer.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Loan Payment - form to process payments made by member.  Fields can include the payment date, principal amount paid, interest amount paid, and cashier.  Validation can be applied to numeric types.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-30483587130005526?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/30483587130005526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/30483587130005526'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/09/final-program-forms.html' title='Final Program: Forms'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-3968813365285428283</id><published>2007-08-28T17:44:00.000+08:00</published><updated>2007-08-29T08:42:10.594+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><title type='text'>Programming Exercise 8: Windows Forms 4</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Instruction: Submit t&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;his exercise on September 10, Monday.  &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Compress the whole project located at "&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;My Documents Path&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;\Visual Studio 2005\Projects\&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Project Name&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;" (default) or at the location you specified.  Upload this file to ELMS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In preparation for your finals, you will be creating an application that will serve as the prototype for your final project.  Although not fully functional, your application should implement these minimum requirements:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The application starts with a login form that will perform user validation.  If the entered username and password are valid, load the main application form.  If not, display an error.  If the user clicks the Cancel button, the application should terminate.  &lt;span style="font-style: italic; font-weight: bold;"&gt;Since the application is not yet capable of storing data to a persistent storage, validate using "guest" as username and password for the meantime.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The application should also integrate your existing User Manager application.  The User Manager form can be loaded when clicking the System -&gt; Maintenance -&gt; System Users menu item in the main application form.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The main application form should contain menu items similar to the sample given, i.e. it should have the following menus:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;System - contains all menu items related to performing system functions&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Maintenance - contains menu items related to configuring system-wide settings like system users and role assignments.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Masterfile - contains menu items related to configuring system-wide settings like lookup values used in transactions.  An example of a menu item is "Loan Type" for a Loans Management System.  &lt;span style="font-style: italic; font-weight: bold;"&gt;Replace this with masterfiles related to your proposed system.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Exit - prompts a message confirming if the user wishes to close the application.&lt;span style="font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Transaction - contains all menu items related to performing system transactions.  An example of a menu item is "Loan Application" for a Loans Management System.  &lt;span style="font-weight: bold; font-style: italic;"&gt;Replace this with transactions related to your proposed system.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Report - contains all menu items related to creating reports.  An example of a menu item is "Loan Summary Report" for a Loans Management System.  &lt;span style="font-weight: bold; font-style: italic;"&gt;Replace this with reports related to your proposed system.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Create a System Configuration form similar to the sample given.  This form does not need to implement any functionality yet and is reserved for future exercises.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The application should also integrate your existing User Manager application.  The User Manager form can be loaded when clicking the System -&gt; Maintenance -&gt; System Users menu item in the main application form.&lt;br /&gt;Hints: In addition to the existing controls you've used, this application also uses the following controls: &lt;ul&gt;&lt;li&gt;MenuStrip&lt;/li&gt;&lt;li&gt;StatusStrip&lt;/li&gt;&lt;li&gt;ListBox&lt;br /&gt;&lt;/li&gt;&lt;li&gt;TabControl&lt;/li&gt;&lt;li&gt;ComboBox&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;For the main application form, research on creating MDI forms.&lt;br /&gt;&lt;br /&gt;You can download a sample output &lt;a href="http://fendaya.110mb.com/uploads/MainApplication.zip"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-3968813365285428283?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3968813365285428283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3968813365285428283'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/08/programming-exercise-8-windows-forms-4.html' title='Programming Exercise 8: Windows Forms 4'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-7322588405190688385</id><published>2007-08-28T09:17:00.001+08:00</published><updated>2007-08-28T09:24:13.099+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='notes'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='regular expressions'/><title type='text'>Sample Code and Slide: Regular Expressions</title><content type='html'>This sample demonstrates using regular expressions for matching patterns in a string, which can be used to perform form data validation.  This also uses a listbox form control for displaying results.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/RegexEx.zip"&gt;Download Code&lt;/a&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/CSharp%20Strings%20and%20Regular%20Expressions.ppt"&gt;Download Powerpoint Presentation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-7322588405190688385?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7322588405190688385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7322588405190688385'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/08/sample-code-and-slide-regular.html' title='Sample Code and Slide: Regular Expressions'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-6772159273980879425</id><published>2007-08-15T14:35:00.001+08:00</published><updated>2007-08-20T14:04:03.733+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><title type='text'>Programming Exercise 7: Windows Forms 3</title><content type='html'>&lt;p&gt;&lt;span style="font-weight: bold;"&gt;This exercise is due on August 22, Wednesday.  Compress the whole project located at "&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;My Documents Path&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;\Visual Studio 2005\Projects\&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Project Name&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;" and upload it to ELMS.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Continuing from exercise #6, update your User Management application to support the following operations:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Edit a User record&lt;/li&gt;&lt;li&gt;Delete a User record&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The application should have these additional buttons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Edit - enables all textboxes (except the current index) for editing&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Delete - deletes the current User record from the list&lt;/li&gt;&lt;/ul&gt;The functionality of these existing buttons should also be updated:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Save - if in edit mode, updates the current User record using values from the textboxes&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Cancel - if in edit mode, disables all textboxes without updating the current User record&lt;/li&gt;&lt;/ul&gt;You can download the updated sample output &lt;a href="http://fendaya.110mb.com/uploads/UserManager2.zip"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Hint: Use the &lt;span style="font-family:courier new;"&gt;ArrayList &lt;/span&gt;class for storing values as this array can be dynamically resized.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-6772159273980879425?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/6772159273980879425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/6772159273980879425'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/08/programming-exercise-7-windows-forms-3.html' title='Programming Exercise 7: Windows Forms 3'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-4853112268203812437</id><published>2007-08-08T11:47:00.000+08:00</published><updated>2007-08-15T14:32:36.878+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><title type='text'>Programming Exercise 6: Windows Forms 2</title><content type='html'>Continuing from exercise #5, create a User Management application that maintains a list of User records.  The application should support the following operations:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add a new User record&lt;/li&gt;&lt;li&gt;Navigate through the list&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The application should contain the following buttons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Prev - moves to the previous User record&lt;/li&gt;&lt;li&gt;Next - moves to the next User record&lt;/li&gt;&lt;li&gt;New - clears and enables all textboxes for record entry&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Save - adds a new User record to the list&lt;/li&gt;&lt;li&gt;Cancel - clears and disables all textboxes without adding a User record to the list&lt;/li&gt;&lt;/ul&gt;Upon application startup, all form controls (textboxes and buttons) except the New button are disabled.  When the New button is clicked, the Save and Cancel buttons, as well as textboxes except the current index, are enabled.  Clicking on the Save button will create a User record with values based on the values entered in the textboxes.  This new record will be added to the list.&lt;br /&gt;&lt;br /&gt;If there are already records in the list, the application should allow navigation through the Prev and Next buttons. The current index textbox should also be updated based on the record's index in the list.  If the current index is 0, the Prev button is disabled.  If the current index is equal to the number of records in the list, the Next button is disabled.&lt;br /&gt;&lt;br /&gt;You can download the sample output &lt;a href="http://fendaya.110mb.com/uploads/UserManager.zip"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-4853112268203812437?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4853112268203812437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4853112268203812437'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/08/programming-exercise-6-windows-forms-2.html' title='Programming Exercise 6: Windows Forms 2'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-6228924522108040281</id><published>2007-08-08T11:36:00.000+08:00</published><updated>2007-08-08T11:41:56.203+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><title type='text'>Sample Code: Forms (Properties)</title><content type='html'>This sample demonstrates using some of the properties of the Form controls to control the application's behavior.  This also demonstrates the use of classes to pass data between forms, accessible through a property.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/FormsEx02.zip"&gt;Download Code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-6228924522108040281?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/6228924522108040281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/6228924522108040281'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/08/sample-code-forms-properties.html' title='Sample Code: Forms (Properties)'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-7751858159385060684</id><published>2007-08-01T09:36:00.002+08:00</published><updated>2007-08-04T18:06:22.101+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><title type='text'>Programming Exercise 5: Windows Forms</title><content type='html'>Create a windows application that allows a user to input the following in a Windows form titled 'Add User':&lt;br /&gt;&lt;ul&gt;&lt;li&gt;User ID&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Password&lt;/li&gt;&lt;li&gt;First Name&lt;/li&gt;&lt;li&gt;Last Name&lt;/li&gt;&lt;li&gt;E-mail Address&lt;/li&gt;&lt;/ul&gt;The application should also contain two buttons: "Add" and "Clear".  Clicking on the "Add" button will display all the entered fields  on a separate Windows form.  The displayed text should follow this format:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;   User ID : &lt;span style="font-style: italic;"&gt;UserID&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   Password: &lt;span style="font-style: italic;"&gt;Password&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   First Name: &lt;span style="font-style: italic;"&gt;First Name&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   Last Name: &lt;span style="font-style: italic;"&gt;Last Name&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   E-mail Address: &lt;span style="font-style: italic;"&gt;E-mail Address&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;Hint: You can use the  &lt;/span&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;MessageBox&lt;/span&gt;&lt;span style="font-style: italic;"&gt; class for this purpose.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Clicking on the "Clear" button clears all fields.&lt;br /&gt;&lt;br /&gt;Here's a screenshot on how the application will look like:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_K4sjNS6qbYI/Rq_8YQTwIGI/AAAAAAAAANg/lqHoOdt_zKU/s1600-h/forms.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_K4sjNS6qbYI/Rq_8YQTwIGI/AAAAAAAAANg/lqHoOdt_zKU/s320/forms.png" alt="" id="BLOGGER_PHOTO_ID_5093567197204193378" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-7751858159385060684?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7751858159385060684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7751858159385060684'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/08/programming-exercise-5-windows-forms.html' title='Programming Exercise 5: Windows Forms'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_K4sjNS6qbYI/Rq_8YQTwIGI/AAAAAAAAANg/lqHoOdt_zKU/s72-c/forms.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-1594464566420702932</id><published>2007-08-01T09:22:00.000+08:00</published><updated>2007-08-01T09:34:18.885+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><title type='text'>Sample Code: Forms (Label, TextBox and Button)</title><content type='html'>This sample demonstrates the use of &lt;span style="font-family:courier new;"&gt;Label&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;Text&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;Button&lt;/span&gt; controls in a Windows Application.  It also uses the &lt;span style="font-family:courier new;"&gt;MessageBox&lt;/span&gt; class for displaying messages in a separate Windows Form.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/FormsEx01.zip"&gt;Download Code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-1594464566420702932?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/1594464566420702932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/1594464566420702932'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/08/sample-code-forms-label-textbox-and.html' title='Sample Code: Forms (Label, TextBox and Button)'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-6747754461098412310</id><published>2007-07-28T15:41:00.000+08:00</published><updated>2007-07-28T15:45:22.903+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='collections'/><category scheme='http://www.blogger.com/atom/ns#' term='arrays'/><title type='text'>Sample Codes: Arrays and Collections</title><content type='html'>Here are the sample codes demonstrating the concepts discussed for arrays and collections&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://fendaya.110mb.com/uploads/ArrayEx.zip"&gt;Arrays Sample Code&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fendaya.110mb.com/uploads/CollectionsEx.zip"&gt;Collections Sample Code&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-6747754461098412310?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/6747754461098412310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/6747754461098412310'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/sample-codes-arrays-and-collections.html' title='Sample Codes: Arrays and Collections'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-4027202644573836753</id><published>2007-07-25T13:22:00.000+08:00</published><updated>2007-08-01T09:35:29.881+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inheritance'/><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><title type='text'>Programming Exercise (Ungraded): Inheritance</title><content type='html'>Implement the following class hierarchy:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_K4sjNS6qbYI/RqbwSwTwIFI/AAAAAAAAANY/uZbDnfpXiZM/s1600-h/phones.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_K4sjNS6qbYI/RqbwSwTwIFI/AAAAAAAAANY/uZbDnfpXiZM/s320/phones.jpg" alt="" id="BLOGGER_PHOTO_ID_5091020633784983634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;Description of each class and its members:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Phone&lt;/span&gt; - an abstract class&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Type&lt;/span&gt; - an abstract readonly property that identifies the type of phone.  Implemented by subclasses&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Number&lt;/span&gt; - an abstract property that sets and gets the phone number.  Implemented by subclasses&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Ring&lt;/span&gt; - an abstract method that will output the message "Ringing &lt;span style="font-style: italic;"&gt;phone-type&lt;/span&gt;" when invoked.  Implemented by subclasses&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Telephone&lt;/span&gt; - an implementation of the &lt;span style="font-family:courier new;"&gt;Phone&lt;/span&gt; abstract class that represents all landline-based phones&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Telephone&lt;/span&gt; - constructor that accepts a phone number as parameter&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Type&lt;/span&gt; - returns "Telephone"&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Number&lt;/span&gt; - gets or sets the phone number.  This property should also validate the assigned phone number using this format: nnn-nnnn&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Ring&lt;/span&gt; - displays the message "Ringing Telephone" when invoked&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;CellularPhone&lt;/span&gt; - an implementation of the Phone abstract class that represents all mobile-based phones&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;CellularPhone&lt;/span&gt; - constructor that accepts a phone number parameter&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Type&lt;/span&gt; - returns "CellularPhone"&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Number&lt;/span&gt; - gets or sets the phone number.  This property should also validate the assigned phone number using this format: nnnn-nnnnnnn&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Ring&lt;/span&gt; - displays the message "Ringing&lt;span style="font-style: italic;"&gt; &lt;/span&gt;CellularPhone" when invoked&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;After implementing, you should be able to use your classes as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;    Telephone telephone = new Telephone("233-1234");&lt;br /&gt;    CellularPhone cellphone = new CellularPhone("0920-1234567");&lt;br /&gt;&lt;br /&gt;    Console.WriteLine(telephone.Type);   // displays "Telephone"&lt;br /&gt;    Console.WriteLine(cellphone.Type);   // displays "CellularPhone"&lt;br /&gt;&lt;br /&gt;    telephone.Number = "233-123";        // displays error&lt;br /&gt;    Console.WriteLine(telephone.Number); // displays "233-1234"&lt;br /&gt;    cellphone.Number = "0920-123x567";   // displays error&lt;br /&gt;    Console.WriteLine(cellphone.Number); // displays&lt;br /&gt;"0920-1234567"&lt;br /&gt;    Phone phone = cellphone;&lt;br /&gt;    Console.WriteLine(phone.Number);     // displays&lt;br /&gt;                                         // "0920-1234567"&lt;br /&gt;&lt;br /&gt;    phone = telephone;&lt;br /&gt;    phone.Ring();                        // displays "Ringing Telephone"&lt;br /&gt;&lt;br /&gt;    Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-4027202644573836753?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4027202644573836753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4027202644573836753'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/programming-exercise-ungraded.html' title='Programming Exercise (Ungraded): Inheritance'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_K4sjNS6qbYI/RqbwSwTwIFI/AAAAAAAAANY/uZbDnfpXiZM/s72-c/phones.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-7397282826887197139</id><published>2007-07-23T13:23:00.000+08:00</published><updated>2007-07-23T18:57:44.472+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'>Exam 1: Solution</title><content type='html'>This solution contains all implementation for the exam problems. Download it &lt;a href="http://fendaya.110mb.com/uploads/Exam01.zip"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-7397282826887197139?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7397282826887197139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7397282826887197139'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/exam-1-solution.html' title='Exam 1: Solution'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-3812820789134543214</id><published>2007-07-17T22:32:00.000+08:00</published><updated>2007-07-18T17:35:50.287+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='exams'/><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'>Exam 1: C# Basics and Classes</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Instruction:&lt;/span&gt; Zip all your project files for this exam and send them to my e-mail address.  Name your zip file as &lt;span style="font-style: italic;"&gt;section&lt;/span&gt;_&lt;span style="font-style: italic;"&gt;name&lt;/span&gt;.zip.  Project folders inside the zip file should be organized as follows:&lt;br /&gt;/Prob1&lt;br /&gt;/Prob2&lt;br /&gt;/Prob3&lt;br /&gt;/Prob4 (if present)&lt;br /&gt;&lt;br /&gt;Ganbatte ne.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem #1 (10pts):&lt;/span&gt; Create a console application that accepts 3 &lt;span style="font-family:courier new;"&gt;float&lt;/span&gt; values and displays these numbers in ascending order.&lt;br /&gt;&lt;br /&gt;Expected program output:&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;Enter float 1: 3.6&lt;br /&gt;Enter float 2: 1.15&lt;br /&gt;Enter float 3: 3.45&lt;br /&gt;&lt;br /&gt;Order:&lt;br /&gt;1.15&lt;br /&gt;3.45&lt;br /&gt;3.6&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Problem #2 (15pts):&lt;/span&gt; Create a console application that computes the Fahrenheit equivalent of  a Celsius value and vice versa.   The application should provide a menu that allows the user to choose the conversion to perform.  In addition, the menu should also have an option to exit the application.  In other words, the application will only terminate if the user chooses this option.&lt;br /&gt;&lt;br /&gt;You can use these conversion formulas:&lt;br /&gt;&lt;br /&gt;F = (9/5) C + 32&lt;br /&gt;C = (F - 32)(5/9)&lt;br /&gt;&lt;br /&gt;Expected program output:&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;Menu:&lt;br /&gt;[C] Convert from Fahrenheit to Celsius&lt;br /&gt;[F] Convert from Celsius to Fahrenheit&lt;br /&gt;[X] Exit application&lt;br /&gt;Choice: C&lt;br /&gt;&lt;br /&gt;Enter temperature in Fahrenheit: 86&lt;br /&gt;Temperature in Celsius: 30&lt;br /&gt;&lt;br /&gt;Menu:&lt;br /&gt;[C] Convert from Fahrenheit to Celsius&lt;br /&gt;[F] Convert from Celsius to Fahrenheit&lt;br /&gt;[X] Exit application&lt;br /&gt;Choice: F&lt;br /&gt;&lt;br /&gt;Enter temperature in Celsius:&lt;br /&gt;Temperature in Fahrenheit:&lt;br /&gt;&lt;br /&gt;Menu:&lt;br /&gt;[C] Convert from Fahrenheit to Celsius&lt;br /&gt;[F] Convert from Celsius to Fahrenheit&lt;br /&gt;[X] Exit application&lt;br /&gt;Choice: X&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem #3 (25pts):&lt;/span&gt; Download &lt;a href="http://fendaya.110mb.com/uploads/Exam01.zip"&gt;this project&lt;/a&gt; and complete the &lt;span style="font-family:courier new;"&gt;Book&lt;/span&gt; class:&lt;br /&gt;&lt;br /&gt;Define constructors that can accept the following parameters:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;All parameters: book type, title, author, pages&lt;/li&gt;&lt;li&gt;Book type, title and author only&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Title and author only&lt;/li&gt;&lt;li&gt;No parameters&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;Note: The book status should be initialized to Available upon creation.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Define the following properties:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Title&lt;/span&gt; - sets and gets the the book title&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Author&lt;/span&gt; - sets and gets the author of the book.&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;The set implementation should not accept values with digits and should only update the field if the given value is valid&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;The get implementation return "Unknown" if it the author field has no value&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Pages&lt;/span&gt; - sets and gets the number of pages in the book.&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Type&lt;/span&gt; - sets and gets the  book type&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;IsBorrowed&lt;/span&gt; (readonly) - returns a bool value indicating whether the book is borrowed or not&lt;/li&gt;&lt;/ul&gt;Define the following methods:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Borrow - sets the book status to borrowed.  This method will return an error if the book's status is already borrowed&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Return - sets the book status to available.  This method should return an error if the book's status is already available.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ToString - returns a string representation of the object, formatted as follows:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;"Type:  &lt;span style="font-style: italic;"&gt;booktype&lt;/span&gt;,  Title: &lt;span style="font-style: italic;"&gt;title&lt;/span&gt;, Author: &lt;span style="font-style: italic;"&gt;author&lt;/span&gt;, Pages: &lt;span style="font-style: italic;"&gt;pages&lt;/span&gt;"&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;After implementing these requirements, you should be able to compile and execute the project.  You can use the defined Main method for testing your implementation.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;Bonus (Extra 10pts):&lt;/span&gt;  Create a &lt;span style="font-family:courier new;"&gt;ConsoleUtil&lt;/span&gt; class that defines the following static methods:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;ReadString&lt;/span&gt; - takes a string parameter that is used as a message prompt and returns a string entered by the user&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;WriteString&lt;/span&gt; - takes a string parameter and displays it&lt;/li&gt;&lt;/ul&gt;Sample usage:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;class Program&lt;br /&gt;{&lt;br /&gt;   static void Main(string[] args)&lt;br /&gt;   {&lt;br /&gt;       string name = ConsoleUtil.ReadString("Enter name:" );  // Prompts user to enter a name&lt;br /&gt;       ConsoleUtil.WriteString("Hello " + name);&lt;br /&gt;&lt;br /&gt;       Console.ReadLine();&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-3812820789134543214?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3812820789134543214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/3812820789134543214'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/exam-1-c-basics-and-classes.html' title='Exam 1: C# Basics and Classes'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-807055245124360356</id><published>2007-07-16T10:27:00.000+08:00</published><updated>2007-07-16T12:18:13.091+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'>Review Exercises</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problem #1: Data Types and &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Variables&lt;/span&gt;&lt;br /&gt;Create a console application that accepts 4 &lt;span style="font-family:courier new;"&gt;int &lt;/span&gt;values from the user, and compute and output the following&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The sum of the 4 integers&lt;/li&gt;&lt;li&gt;The product of the 4 integers&lt;/li&gt;&lt;li&gt;The difference between integers 1 and 2&lt;/li&gt;&lt;li&gt;The quotient between integers 3 and 4 expressed as a &lt;span style="font-family:courier new;"&gt;float &lt;/span&gt;type&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Hint: Recall the &lt;span style="font-family:courier new;"&gt;Convert.To&lt;span style="font-style: italic;"&gt;type-name&lt;/span&gt;()&lt;/span&gt; or &lt;span style="font-style: italic;font-family:courier new;" &gt;type-name&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;.Parse() &lt;/span&gt;methods for converting a string to a numeric type.  Also recall how to cast one data type to another to get the desired value.&lt;br /&gt;&lt;br /&gt;Sample program output:&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;&lt;br /&gt;Enter integer 1: 10&lt;br /&gt;Enter integer 2: 5&lt;br /&gt;Enter integer 3: 8&lt;br /&gt;Enter integer 4: 14&lt;br /&gt;&lt;br /&gt;Sum: 37&lt;br /&gt;Product: 5600&lt;br /&gt;Difference (1 and 2): 5&lt;br /&gt;Quotient (3 and 4):  0.5714286&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem #2: Control Structures (Conditionals, Loops)&lt;/span&gt;&lt;br /&gt;Create a console application that accepts a number of student grades to process.  The application should loop through this number to get the grade for each student.&lt;br /&gt;&lt;br /&gt;For each grade input, the application should check if the grade is within 60 to 100.   If the grade is invalid, the application should display an error and ask for input again.&lt;br /&gt;&lt;br /&gt;If the grade is valid, the application should check if the student passed or failed (failing grade is between 60 to 74) and should increment the appropriate count for passed or failed students (declared as variables).  The application should also be able to compute the percentage of passed and failed students.&lt;br /&gt;&lt;br /&gt;Sample program output:&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;&lt;br /&gt;Enter number of students to process: 10&lt;br /&gt;&lt;br /&gt;Enter grade for student 1 (60-100): 80&lt;br /&gt;Enter grade for student 2 (60-100): 10&lt;br /&gt;Error: Grade must be within 60 to 100&lt;br /&gt;Enter grade for student 2 (60-100): 74&lt;br /&gt;...&lt;br /&gt;Enter grade for student 10 (60-100): 90&lt;br /&gt;&lt;br /&gt;Total no. of students: 10&lt;br /&gt;No. of students who passed: 6&lt;br /&gt;No. of students who failed: 4&lt;br /&gt;&lt;br /&gt;Percentage of students who passed: 60%&lt;br /&gt;Percentage of students who failed: 40%&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem #3: Classes - Constructors, Fields, Properties and Methods&lt;/span&gt;&lt;br /&gt;Create a class called &lt;span style="font-family: courier new;"&gt;MathUtil &lt;/span&gt;which implements the basic arithmetic functions defined in Problem #1.  The choice on how to define the constructors, fields, properties or methods is totally up to you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-807055245124360356?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/807055245124360356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/807055245124360356'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/review-exercises.html' title='Review Exercises'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-5166144404092198933</id><published>2007-07-16T09:30:00.000+08:00</published><updated>2007-07-16T10:50:23.532+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='notes'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'>Slides: C# Basics and Classes</title><content type='html'>I updated the PowerPoint presentations used in our discussions.  You can download them here:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://fendaya.110mb.com/uploads/CSharp%20Basics.ppt"&gt;C# Basics&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fendaya.110mb.com/uploads/CSharp%20Classes%20and%20Structs.ppt"&gt;C# Classes&lt;/a&gt; - covers up to implementation inheritance only&lt;/li&gt;&lt;/ul&gt;Review these concepts for the prelim exam&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-5166144404092198933?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/5166144404092198933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/5166144404092198933'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/slides-c-basics-and-classes.html' title='Slides: C# Basics and Classes'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-1013021432303927299</id><published>2007-07-11T06:21:00.000+08:00</published><updated>2007-07-13T23:20:19.593+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><title type='text'>Programming Exercise 4: Classes - Methods</title><content type='html'>Define a &lt;span style="font-family:courier new;"&gt;Deactivate()&lt;/span&gt; method in your existing &lt;span style="font-family:courier new;"&gt;User&lt;/span&gt; class.  Calling this method will set its status field to &lt;span style="font-family:courier new;"&gt;Inactive&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This is the expected output when using your class:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;  static void Main(string[] args)&lt;br /&gt;  {&lt;br /&gt;      User user = new User("jtamad", "jtamad");&lt;br /&gt;      Console.WriteLine(user.IsActive);  // Outputs "True" (default value)&lt;br /&gt;      user.Deactivate();&lt;br /&gt;      Console.WriteLine(user.IsActive);  // Outputs "False"&lt;br /&gt;      Console.ReadLine();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Define another method, &lt;span style="font-family: courier new;"&gt;GetCopy()&lt;/span&gt;, that allows the class to return a copy of itself.  Hint: Use the &lt;span style="font-family: courier new;"&gt;MemberwiseClone()&lt;/span&gt; method inherited from &lt;span style="font-family: courier new;"&gt;System.Object&lt;/span&gt;.  You also need to perform a cast to the appropriate &lt;span style="font-family: courier new;"&gt;User&lt;/span&gt; object as this method returns a &lt;span style="font-family: courier new;"&gt;System.Object&lt;/span&gt; type.&lt;br /&gt;&lt;br /&gt;After implementing this, you should be able to use your class as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;    static void Main(string[] args)&lt;br /&gt;    {&lt;br /&gt;        User user1 = new User("jtamad", "jtamad");&lt;br /&gt;        Console.WriteLine(user1.UserID);  // Outputs "jtamad"&lt;br /&gt;&lt;br /&gt;        User user2 = user1;               // user2 references the&lt;br /&gt;                                          // same object as user1&lt;br /&gt;        user2.UserID = "juantamad";       // Modifies user1 also&lt;br /&gt;                                          // since user2 references&lt;br /&gt;                                          // the same object as user1&lt;br /&gt;        Console.WriteLine(user1.UserID);  // Outputs "juantamad&lt;br /&gt;&lt;br /&gt;        user2 = user1.GetCopy();          // user2 has its own copy&lt;br /&gt;                                          // of a User object copied&lt;br /&gt;                                          // from user1&lt;br /&gt;        user2.UserID = "jtamad";          // Does not affect user1&lt;br /&gt;                                          // since this is a new object&lt;br /&gt;        Console.WriteLine(user1.UserID);  // Outputs "juantamad"&lt;br /&gt;        Console.WriteLine(user2.UserID);  // Outputs "jtamad"&lt;br /&gt;&lt;br /&gt;        Console.ReadLine();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-1013021432303927299?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/1013021432303927299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/1013021432303927299'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/programming-exercise-4-classes-methods.html' title='Programming Exercise 4: Classes - Methods'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-4362378269590759542</id><published>2007-07-10T22:49:00.001+08:00</published><updated>2007-07-12T11:58:15.086+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='inheritance'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><title type='text'>Sample Code: Class Inheritance</title><content type='html'>This sample implements the inheritance hierarchy shown below&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_K4sjNS6qbYI/RpWjI3VxfRI/AAAAAAAAANI/7o6-0xDUV18/s1600-h/shapes.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_K4sjNS6qbYI/RpWjI3VxfRI/AAAAAAAAANI/7o6-0xDUV18/s320/shapes.jpg" alt="" id="BLOGGER_PHOTO_ID_5086150726874397970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://fendaya.110mb.com/uploads/ClassEx02.zip"&gt;Download Code&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note: If clicking on this link doesn't work, copy the link location to a new browser window&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-4362378269590759542?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4362378269590759542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/4362378269590759542'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/sample-code-class-inheritance.html' title='Sample Code: Class Inheritance'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_K4sjNS6qbYI/RpWjI3VxfRI/AAAAAAAAANI/7o6-0xDUV18/s72-c/shapes.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-2157071477990325238</id><published>2007-07-09T08:16:00.000+08:00</published><updated>2007-07-09T10:22:58.301+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><title type='text'>Programming Exercise 3: Classes - Static Fields and Static Constructors</title><content type='html'>Define additional fields in your existing &lt;span style="font-family:courier new;"&gt;User&lt;/span&gt; class.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;_dateCreated&lt;/span&gt; (static readonly) - Date of object creation&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;ClassesCreated&lt;/span&gt; (static) - Number of objects instantiated&lt;/li&gt;&lt;/ul&gt;Define a static constructor that initializes the &lt;span style="font-family:courier new;"&gt;ClassesCreated&lt;/span&gt; field to 0.&lt;br /&gt;&lt;br /&gt;Modify your existing constructor to set values for the additional fields:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; The &lt;span style="font-family:courier new;"&gt;_dateCreated&lt;/span&gt; field is set to the current date&lt;/li&gt;&lt;li&gt; The &lt;span style="font-family:courier new;"&gt;ClassesCreated &lt;/span&gt;field is incremented&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Define a read-only property for the&lt;span style="font-family:courier new;"&gt; _dateCreated&lt;/span&gt; field&lt;br /&gt;&lt;br /&gt;After implementing these, you should be able to use your class as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt"&gt;&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;   static void Main(string[] args)&lt;br /&gt;   {&lt;br /&gt;       User user1 = new User("user1", "password1");&lt;br /&gt;       Console.WriteLine(user1.DateCreated);    // Outputs the creation date for user1&lt;br /&gt;       Console.WriteLine(User.ClassesCreated);  // Outputs "1" since this is the first object&lt;br /&gt;&lt;br /&gt;       User user2 = new User("user2", "password2");&lt;br /&gt;       Console.WriteLine(user2.DateCreated);    // Outputs the creation date for user2&lt;br /&gt;       Console.WriteLine(User.ClassesCreated);  // Outputs "2" since this is the second object&lt;br /&gt;       Console.ReadLine();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-2157071477990325238?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/2157071477990325238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/2157071477990325238'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/programming-exercise-3-classes-static.html' title='Programming Exercise 3: Classes - Static Fields and Static Constructors'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-1447804860413186351</id><published>2007-07-07T20:35:00.000+08:00</published><updated>2007-07-07T20:45:38.275+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='resources'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'></title><content type='html'>A couple of resources for OOP programming in C#:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.samspublishing.com/articles/article.asp?p=101373"&gt;samspublishing.com: Object-Oriented Programming in C#&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.developer.com/net/net/article.php/1445631"&gt;developer.com: Learning C# and OOP, Classes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.devhood.com/training_modules/dist-a/WritingOOCSharp/WritingOOCSharp.htm"&gt;devhood.com: Writing Object-Oriented Software in C#&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-1447804860413186351?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/1447804860413186351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/1447804860413186351'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/couple-of-resources-for-oop-programming.html' title=''/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-9197876168165980197</id><published>2007-07-05T12:38:00.001+08:00</published><updated>2007-07-12T11:07:19.462+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='basics'/><title type='text'>Sample Codes: Classes</title><content type='html'>Here are a couple of sample codes available for download:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://fendaya.110mb.com/uploads/BasicsEx01.zip"&gt;&lt;span style="text-decoration: underline;"&gt;C# Basics&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fendaya.110mb.com/uploads/ClassEx01.zip"&gt;&lt;span style="text-decoration: underline;"&gt;Classes&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;Note: If clicking on these links don't work, copy the link location to a new browser window&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-9197876168165980197?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/9197876168165980197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/9197876168165980197'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/sample-codes-classes.html' title='Sample Codes: Classes'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3690756888096802857.post-7541825166500418692</id><published>2007-07-04T12:55:00.001+08:00</published><updated>2007-07-09T10:22:26.069+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exercises'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><title type='text'>Programming Exercise 2: Classes - Fields, Properties and Constructors</title><content type='html'>Create a &lt;span style="font-family:courier new;"&gt;User &lt;/span&gt;class.  This class should at least contain the following fields:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;User ID - this is equivalent to a login name&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Password&lt;br /&gt;&lt;/li&gt;&lt;li&gt;First Name&lt;/li&gt;&lt;li&gt;Last Name&lt;/li&gt;&lt;li&gt;E-mail Address&lt;/li&gt;&lt;li&gt;Status - valid values are 'Inactive', 'Active', 'Deleted'&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Define constructors that accept the following parameter lists:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;All parameters: User ID, Password, First Name, Last Name, E-mail Address&lt;br /&gt;&lt;/li&gt;&lt;li&gt;User ID, Password and E-mail Address&lt;br /&gt;&lt;/li&gt;&lt;li&gt;User ID and Password Only&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;** The status field should be initialized to 'Active' upon creation&lt;br /&gt;** Constructors 2 and 3 should use a constructor initializer&lt;br /&gt;&lt;br /&gt;Define read-only properties that return the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;IsActive &lt;/span&gt;– whether or not the account's status is active&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;FullName&lt;/span&gt; – a concatenation of the account's first and last names&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Define additional properties that behave as follows:&lt;br /&gt;&lt;ul&gt;&lt;li style="font-family: courier new;"&gt;UserID&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Set operation should ensure the user id does not start with a digit and should only update the user id field if the given value is valid&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Get operation just returns the user id&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Password&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Set operation should validate the password length is within 8 to 20 characters and should only update the password field if the given value is valid&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;               Get operation just returns the password&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;** You can reuse elements from your first programming exercise.&lt;br /&gt;** Refer to the &lt;span style="font-family:courier new;"&gt;string &lt;/span&gt;class in the MSDN for methods in processing strings&lt;br /&gt;&lt;br /&gt;After implementing these, you should be able to use your class as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(128, 128, 128); font-size: 8pt;"&gt;&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;    static void Main(string[] args)&lt;br /&gt;    {&lt;br /&gt;        User user = new User("jtamad", "jtamad",&lt;br /&gt;            "Juan", "Tamad", "jtamad@tapulan.com");&lt;br /&gt;&lt;br /&gt;        Console.WriteLine(user.IsActive);  // Outputs "True"&lt;br /&gt;        Console.WriteLine(user.FullName);  // Outputs "Juan Tamad"&lt;br /&gt;&lt;br /&gt;        user.UserID = "1jtamad";           // Outputs an error&lt;br /&gt;        user.Password = "1jta";            // Outputs an error&lt;br /&gt;        Console.WriteLine(user.UserID);    // Outputs "jtamad", no changes&lt;br /&gt;        Console.WriteLine(user.Password);  // Outputs "jtamad", no changes&lt;br /&gt;&lt;br /&gt;        user.UserID = "juantamad";&lt;br /&gt;        user.Password = "juantamad";&lt;br /&gt;        Console.WriteLine(user.UserID);    // Outputs "juantamad"&lt;br /&gt;        Console.WriteLine(user.Password);  // Outputs "juantamad"&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3690756888096802857-7541825166500418692?l=dotnetstarter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7541825166500418692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3690756888096802857/posts/default/7541825166500418692'/><link rel='alternate' type='text/html' href='http://dotnetstarter.blogspot.com/2007/07/programming-exercise-2-classes-fields.html' title='Programming Exercise 2: Classes - Fields, Properties and Constructors'/><author><name>fendaya</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
