1 / 40

Visualizing C# .NET in a Grid Environment

Visualizing C# .NET in a Grid Environment. Getting young girls interested in Computer Science and other mathematical based fields. Melea Lann Williams University of North Carolina Wilmington. Table of Contents. Background Info

stian
Download Presentation

Visualizing C# .NET in a Grid Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visualizing C# .NET in a Grid Environment Getting young girls interested in Computer Science and other mathematical based fields Melea Lann Williams University of North Carolina Wilmington

  2. Table of Contents • Background Info • “The Real World” … Incorporating Internships into the learning environment • Master’s Thesis … “The Doll Idea” … getting young girls interested • Beginning C# … Code and Samples • WPF … Windows Presentation Foundation • .NET

  3. Background Information

  4. Mayan Math • Three symbols Shell = “Complete” or “zero” Stick = 5 Bean = 1

  5. 20 2 (400) * 2 20 1 (20) * 15 20 0 (1) * 8 800 300 8 Total: 1108 Mayan Math Example

  6. Internships “Life in the Real World”

  7. Reasons to do an Internship • Applying general computer science concepts, learned in classroom, in the real world. • Gain experience Experience = better pay • Get ideas for masters thesis More exposure = better ideas • Learn what type of work environment suits your needs and personality type.

  8. Things Learned • C#, Visual Basic, Team Foundation Server • Documentation Procedures … which is a lot, for the Nuclear Industry. • Help File System Implementation • Software Testing Implementation • Learn / re-learn Chemistry Concepts and Nuclear Engineering Concepts

  9. Thank God for VPN!

  10. The “Baby Doll” Idea Getting young girls interested in Computer Science and other related fields.

  11. Current Problem • Most current dolls have everything already done. • Most other programming related toys do not include the younger girl audience. • Including more familiar role playing games. • Most current toys for younger girls do not include many building concepts • More needed research about women in Computer Engineering

  12. Solution • Build a physical doll that interfaces with a computer through USB port. • The doll will be able to imitate human behavior • The gui interface will be designed with the intention of “ease of use” for girls between the ages of 5 – 11. • Multiple dolls will be able to interact with each other through grid computing

  13. Problems In Solution • Security issues --- three to four levels of security issues • It takes a ton of motors and controls to simulate human behavior. • The weight of the doll. • Child choosing what the doll would look like. • The amount of modeling work involved.

  14. Solutions to Problems • Scale down the scope. • Doll doesn’t have to completely mimic human behavior, instead, choose just a few things. • In order to save modeling time, and for the actual doll to match what is seen on the screen, versatility of how the doll looks will have to be scratched. • Grid Security limits and boundaries.

  15. How to Implement • At first, I had decided to use NXT robots to do the initial making of the doll … this part has been scratched for now. • Gather more data on women currently in the industry through polling and questionnaires, etc. • Use proprietary software (Microsoft) to eliminate possible integration problems.

  16. How to implement (con.) • Use NGrid as a way to interface between .NET and grid environment. • C# will be used for the code.

  17. C # Background, Code, and Examples

  18. Why C#? • Since Java was developed first, C# has had the advantage to capitalize upon the weaknesses of Java. • The ability to easily incorporate .NET components and convert to web services. • Works very well with XML • Ability to reference many different programs of multiple file formats.

  19. So, why not Java? The differences: • C# allows restricted use of pointers. • C# permits low-level access to machine resources. • C# allows for user defined value types by using keyword “struct”. • Primitive types can define methods without separate wrapper class.

  20. So, why not Java? (con.) Ex: Integer.toString(100); //java 100.ToString();// C# • C# arrays correspond to an object in the Array class, whereas, in Java, each array corresponds to a direct subclass of the object class. • C# supports both true multidimensional arrays, along with jagged arrays. (example next slide)

  21. Multi-Dimensional Array Example: int[,] myArray = new int[4,2]; // makes an array of 4 rows, 2 columns Three dimensional array example: int[,,] myArray = new int [4,2,3]; • Downside --- even though this has it’s benefits, it can get confusing… sometimes, it’s easier to use jagged arrays.

  22. So, why not Java? • C# allows for partial classes. Partial classes means that the class definition can be split across multiple source files. (there is nothing like this in Java, and can be confusing) (example on next 3 slides)

  23. So, why not Java? (con.) using System; partial class XY  { int x; public int X {     get { return x; }     set { x = value; }   } }

  24. So, why not Java? partial class XY  { int y; public int Y {     get { return y; }     set { y = value; }   } }

  25. So, why not Java? class MainClass  { public static void Main() {     XY xy = new XY();     Console.WriteLine(xy.X + "," + xy.Y);   } }

  26. Orthogonal or not? There are 503 pages in Word format of language specifications! • It is orthogonal in nature … just extremely complex. • On a good note … tons of tutorials on the internet.

  27. Screenshot Hello World

  28. Source Code Hello World using System.Collections.Generic; using System.Linq; using System.Text; namespace TextHello { class Program { static void Main(string[] args) { System.Console.WriteLine("Hello World"); } } }

  29. Output Hello World

  30. Windows Presentation Foundation • Graphical subsystem used within .NET applications • Uses XAML mark-up language (Microsoft version of XML) • Provides a consistent programming model by separating the user interface and the business logic (supposedly)

  31. WPF Hello XAML <Window x:Class="WPFHello.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Hello" Height="130" Width="297" Loaded="Window_Loaded"> <Grid> <Label Height="28" Margin="13,12,126,0" Name="label1" VerticalAlignment="Top" FontSize="12">Please enter your name:</Label> <TextBox Height="28" Margin="22,36,115,0" Name="userName" VerticalAlignment="Top" /> <Button Height="28" HorizontalAlignment="Right" Margin="0,36,23,0" Name="ok" VerticalAlignment="Top" Width="57" Click="ok_Click">OK</Button> </Grid> </Window>

  32. C# code for WPF Hello using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes;

  33. namespace WPFHello { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { } private void ok_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Hello " + userName.Text); } } }

  34. Conclusion • Why is it important to learn Microsoft products / C#? … because large U.S. based business uses Microsoft. • There are many similarities between C# and Java syntax wise, however, there is a large difference between the structure and functionality of the language.

  35. References • http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java#Generics • http://www.java2s.com/Tutorial/CSharp/0140__Class/0580__Partial-Class.htm • http://msdn.microsoft.com/en-us/library/ms173156.aspx • Microsoft Visual C# 2008 Step by Step John Sharp

More Related