Free Essay

Java Tictactoe

In:

Submitted By estebanslaydeal
Words 295
Pages 2
Laboratory Report Cover Sheet
DeVry University
College of Engineering and Information Sciences

Course Number: ECET210
Professor:
Laboratory Number: 1
Laboratory Title: AC Fundamentals, Sinusoidal and Other Waveform Characteristics
Submittal Date: Click here to enter a date.

Objectives: The objectives for the lab this week was to measure the waves and frequency of a square, triangle and sine waves using the tools provided by the lab.

Results: the results were how we expected, the results show all the calculations of the triangle, square and sine waves.

Conclusions: As a conclusion I could say I learned the process to calculate the different kind of waves based of a determined frequency.

Observations/Measurements:

III. A. 7. Sine Wave Measurements:

Frequency(kHz) | Peak Value(VP, in V) | Peak to Peak Voltage, VPP | RMS Value, VRMS | Voltage as per DMM | Time period (msec) | 1 | 1 | 2VPP | .715 | .703 | 1.00 |

III. A. 8. Sine Wave Calculated Period:

T = 1ms

III. A. 9. Measured Versus Calculated Period:

Match? Yes ___x__ No ______

III A. 10. Various Sine Wave Frequencies:

Frequency, (kHz) | Time Period | RMS Value | | Measured | Calculated | Measured | Calculated | 2.0 | 500us | 0.005us | .713ms | .707ms | 3.0 | 334us | 3.33us | .713ms | .707ms | 4.0 | 250us | 0.00025us | .713ms | .707ms | 5.0 | 200us | 0.0002us | .713ms | .707ms |

III. A. 11. Different Waveform Measurement:

Type of Waveform | Measured Frequency | RMS Value from Internet | Value per DMM | Square Wave | 4 | 1.01 | 015.3 mv | Triangle Wave | 5 | 583mv | 015.0 mv |

III. B. 3, MultiSim Waveform Measurements:

Type of Waveform | Measured RMS Results (Tables 2 & 3) | MultiSim Simulation Results | Square Wave | | | Triangle Wave | | | Sine Wave | | |

Grade: Deliverable | Points Available | Points Achieved | Laboratory Cover Sheet | 8 | | Working Circuit(s)/Program(s) | 8 | | Observations/Measurements | 6 | | Questions | 8 | | Total Points | 30 | | | Comments: |

Similar Documents

Premium Essay

Cd Key

...Java Quick Reference Console Input Scanner input = new Scanner(System.in); int intValue = input.nextInt(); long longValue = input.nextLong(); double doubleValue = input.nextDouble(); float floatValue = input.nextFloat(); String string = input.next(); Console Output System.out.println(anyValue); JOptionPane.showMessageDialog(null, "Enter input"); GUI Input Dialog String string = JOptionPane.showInputDialog( "Enter input"); int intValue = Integer.parseInt(string); double doubleValue = Double.parseDouble(string); Message Dialog Primitive Data Types byte short int long float double char boolean 8 bits 16 bits 32 bits 64 bits 32 bits 64 bits 16 bits true/false Arithmetic Operators + * / % ++var --var var++ var-addition subtraction multiplication division remainder preincrement predecrement postincrement postdecrement Assignment Operators = += -= *= /= %= assignment addition assignment subtraction assignment multiplication assignment division assignment remainder assignment Relational Operators < >= == != less than less than or equal to greater than greater than or equal to equal to not equal Logical Operators && || ! ^ short circuit AND short circuit OR NOT exclusive OR if Statements if (condition) { statements; } if (condition) { statements; } else { statements; } if (condition1) { statements; } else if (condition2) { statements; } else { statements; } switch Statements switch (intExpression) { case value1: statements; break; ... case valuen: statements; break;...

Words: 73366 - Pages: 294

Premium Essay

Prog Research Paper Unit 1

...1970’s Dartmouth Basic- was created by John Kemeny and Thomas Kurtz on May 1, 1964. Basic stands for Beginners All-purpose Symbolic Instruction Code . The aims of the BASIC system were: to develop a system and language that was friendly, easy to learn and use, to introduce computing as an adjunct to other courses, to operate an open access policy (i-programmer.info, 2010). Pascal- was created by Niklaus Wirth in 1972. He wanted a language suitable for teaching but for teaching computer science. It is best described as a simplified version of Algol. It was simplified both to make it easier to learn and to make it easier to compile (i-programmer.info, 2010). C- Was created by Ken Thompson iin the form of B and tweaked by Dennis Ritchie and renamed C in the 1970’s. It was the original code Unix was written in. Its function was for ease of use (i-programmer.info, 2010). Forth- was created by Charles H Moore in the 1970’s. The motivation behind this language was for both interactive execution of commands and the ability to compile sequences of commands for later execution (i-programmer.info, 2010). PLEX (Programming Language for EXchanges)- was created by Goran Hemdahl at Ericsson in the 1970’s. It is a special-purpose, pseudo-parallel and event-driven real-time programming language dedicated for AXE telephone exchanges, It is a propriatary language (i-programmer.info, 2010). 1980’s Atari ST BASIC – Atari commissioned MetaComCo to write a version of BASIC that...

Words: 1761 - Pages: 8

Premium Essay

Code Resusability

...Reusability of Code PRG/211 Reusability of Code When a developer is deciding to write code or a full out program, he/she must take into account the method of the code. There are many types of programming languages, but there are essentially two types of programming: procedural and object oriented (OPP). Both have their place in programming but you can also find procedural in OOP as well. But first we need to see what are the differences and similarities between the two. Structured programming consists of a level of such straightforwardness is reached that the execution is obvious to the programmer. Object-oriented programming consists of assemblage code with the data on which it operates so that this "object" can function separately of the rest of the software system. Structured programming and object-oriented programming are not exclusive from each other. You can structure the code in an object, and you can use objects to implement the modules of code in a structured program. Task vs. Data Structured programming is based around data structures and subroutines. The subroutines are where stuff actually "happens", and the data structures are simply containers for the information needed by those subroutines. Object oriented programming, on the other hand, shifts your primary focus to the data itself. Instead of asking "what do I want to do and what will I need to know to do it", you ask "what kind of things do I want to have and what can those things do for...

Words: 335 - Pages: 2

Free Essay

.Net and Java Technology Comparison

....NET & Java Comparsion Activity Zeferino Reyes CSS - 422 December 12, 2011 Nasser Alaeddine .NET & Java Comparison Activity In this written document will focus on the advantages and disadvantages or the use of .NET technology in use compared to the use of JAVA Technology as Software Architecture, (University of Phoenix, 2010, 2009, 2008, 2007, 2006, 2005). .NET technology is the means to “connect” meaning connecting software, people, structures, things like printers, networks, computers, anything one can think of, (Getdotnnu.com, 2004-06). JAVA Technology is known to be adaptable where it can connect computers to networks, mobile phones to the internet, and game consoles such as the new Playstation 3, Xbox 360, and Nintendo Wii to the internet to access web browsing, built in plug in like Netflix to watch movies, and to other consoles for online gaming like the popular shooter Call of Duty. Advantages of .NET technologies are that it has the ability to grab internet servers that web services and tools such as internet apps or anything that can produce these services. One profitable feature of .NET is its ASP.net technologies that allows for the making of additional websites and net services that exist on the .NET infrastructure, (Getdotnu.com, 2004-06). Another powerful advantage of .NET technology is the ASP feature is that it creates construction sites, services and applications and does not require as much coding as the older coding in the beginning...

Words: 705 - Pages: 3

Free Essay

Web 238 Team Assignment

...information to share. The basic Web site is built with HTML, and then creatively enhanced with CSS. To create a visually expressive Web site that can attract thousands of visitors each day you need to use more than HTML and decide what the site contains. There are different languages that can be used to add a sense of style to your site, some of the possible devices are JavaScript, Java, DOM, and AJAX. In the following paper our team will discuss a few examples of how each can be used in Web development. Comparison of Java and JavaScript Java and JavaScript are both object-oriented languages (Burns, 2012). Knowing how to use one language often becomes confusing when attempting to learn the other. Some of the differences between the two are that Java applets can create stand-alone applications that work across platforms running as standalone programs. However, JavaScript cannot create these stand-alone applications and reside on an Internet browser. A programmer must compile Java code before the program can run. This requires an outside program just to compile the code. A compiler turns Java code into machine language code before a browser can interpret it. Any changes the programmer makes to the code will require him to recompile the program and this can be a real tedious act to commit over and over. A web designer can write JavaScript functions directly in a text editor, saving the file and upload it to the server for immediate execution or using an editor like Adobe...

Words: 2442 - Pages: 10

Premium Essay

Goal Evaluation Matrix

...Communication Styles Worksheet You spent the past few days exploring the resources available to students at University of Phoenix, and you want to share what you learned with a friend who is interested in enrolling. Write a 150- to 200-word e-mail to your friend summarizing the resources available to students. Hey Dina, So as you know I have been in school online and I am really enjoying it. I really want to encourage you to do it as well. It is so easy and completely fools proof! Oh my gosh seriously you need to try it too. Right from my home page I can access the library where I can get research done or check my papers for potential plagiarism or errors. I can access different tutorials and labs ranging from ways to avoid plagiarism to java programming. I can even get assistance in math. There is a media library as well as so many other resources like a normal library. I don’t have to worry about getting in the car and going to the school to fight for a computer in their library. It is all just right here. The best part is I can do this online at home. Or when I am at work on break I can get on it from my phone. Easy stuff! Anyhow just let me know what you think. I would love to hear you are also going back to school as well. You asked your facilitator to review your e-mail draft. She liked what you wrote and asked you to write a summary to post in the class forum for the other students to read. Write a 150- to 200-word summary for your class of the resources available...

Words: 485 - Pages: 2

Premium Essay

Java

...that has made his work popular with programmers for many years. Michael Schidlowsky and Sedgewick have developed concise new Java implementations that both express the methods in a natural and direct manner and also can be used in real applications. Algorithms in Java, Third Edition, Part 5: Graph Algorithms is the second book in Sedgewick's thoroughly revised and rewritten series. The first book, Parts 1-4, addresses fundamental algorithms, data structures, sorting, and searching. A forthcoming third book will focus on strings, geometry, and a range of advanced algorithms. Each book's expanded coverage features new algorithms and implementations, enhanced descriptions and diagrams, and a wealth of new exercises for polishing skills. The natural match between Java classes and abstract data type (ADT) implementations makes the code more broadly useful and relevant for the modern object-oriented programming environment. The Web site for this book (www.cs.princeton.edu/~rs/) provides additional source code for programmers along with a variety of academic support materials for educators. Coverage includes: A complete overview of graph properties and types Diagraphs and DAGs Minimum spanning trees Shortest paths Network flows Diagrams, sample Java code, and detailed algorithm descriptions A landmark revision, Algorithms in Java, Third Edition, Part 5 provides a complete tool set for programmers to implement, debug, and use graph algorithms...

Words: 281 - Pages: 2

Premium Essay

Developer

...Programming--Malone Basics of Java Programming (A Work In Progress) What Constitutes a Java Program? A Java program consists of one or more source files. Each source file is called .java, where is the name of the class contained in that source file and .java is the extension that identifies the file as a Java source code file. In general, each source file contains one class. The name of the class must match the name of the file (without the extension) exactly. To execute a Java program, you first need to compile the source code into byte code. Byte code files have the name .class. If you’re working from the shell, this is done using the javac command (where “c” is for compiler). Usually we will be compiling using the Xcode IDE. Once compiled, the program is executed using the Java interpreter (a.k.a. the Java Virtual Machine or JVM). From the shell, the JVM is invoked with the “java” command. Again we will usually be doing this with the Build and Go or Debug options of the Xcode IDE. A Java program must have a routine called main(), which is the starting point for program execution. main() will always look something like this: public static void main (String args[]) { // insert code here... System.out.println("Hello World!"); } Source Code Formatting Keep in mind the following when writing Java source code: Java is case sensitive (“foo”, “Foo”, and “fOO” are all considered to be different in Java). • Every line of code in Java must end in a semi-colon (“;”). • Java doesn’t care about white...

Words: 968 - Pages: 4

Free Essay

C++ Template

...INTRODUCTION TO TEMPLATES *Mr.A.N.Shah, **Mr. N. N. Shah *P.G. Student,Computer Department, C.U.Shah College of Engineering & Technology, Wadhwan City **Lecturer (E.C.), R.K. University school of Engineering, Rajkot. ABSTRACT Templates allow us to define generic class and function. So it supports generic programming. Generic programming is an approach where generic types are used as parameters in algorithms so that they work for a variety of suitable data types and data structures. A template can be used to create a family of classes or functions. For example, it can be used with class like student etc and it also can be used for function mul() etc. A template is also known as a kind of macro. Whenever template is created for any class it required substituted data types. Since template is define with a parameter for classes or functions so it is sometime called as parameterized classes or functions. The main aim of this thesis is to show various ways to use template either with function or class. INTRODUCTION Template is one which supports generic class and function. So it supports generic programming. Generic programming is an approach where generic types are used as parameters in algorithms so it supports variety of suitable data types and data structures. CLASS TEMPLATE Following is syntax of class template. template class class-name { //………… // class members specification //...

Words: 265 - Pages: 2

Premium Essay

Is Technology Moving Faster Than Ethics ??

...defined inside and outside of a method. c) True d) False 4. Types defined in the programming language itself are called _____________ types. a) b) c) d) Class Primitive Library All of the above 5. Circle all that apply. Which of the following lines is not a Java comment? a) b) c) d) e) /** comments */ // comments -- comments /* Comments */ ** comments ** 1 6. For each software development concept below indicate whether it applies at design time, runtime, or both. You should circle one letter on each line. The first line is an example. Compiling source files Logic errors Syntax errors a) Design time a) Design time a) Design time b) Runtime b) Runtime b) Runtime c) Both c) Both c) Both 7. Which Java operator is used to access variables and methods belonging to an object? a) b) c) d) e) The [] operator The -> (arrow) operator The _ (underscore) operator The . (dot) operator None of the above 8. Suppose you’ve written a Java class called Quadratic. To create an object variable using that class you should write the following: a) b) c) d) Quadratic equation = Quadratic(); Quadratic() = new Quadratic; Quadratic equation = new Quadratic(); Quadratic equation = new Equation(); 2 B) Fill in the Blanks 9. The Java primitive type ____________ uses 16 bits to store positive and negative whole number values. 10. Examine the following code fragment: 1. int value = 12; 2. value = value * (3/2); 3. value = value % 2; 4. value = value - 11; 5. value = value / 3; 6. System...

Words: 604 - Pages: 3

Free Essay

Java Class Shape

...Shape class /** * This is a class that represent any shape. This is the superclass of all shapes. * @author yklam2 * */ public class Shape { private boolean canvas[][]; private int width; private int height; /** * Create an empty shape. */ public Shape() { this(0, 0); } /** * Create a shape with a specific width and height. * @param width The width of this shape. * @param height The height of this shape. */ protected Shape(int width, int height) { this.width = width; this.height = height; canvas = new boolean[height][width]; } /** * Set a pixel * @param row The row of the pixel. * @param column The column of the pixel. */ protected void setPixel(int row, int column) { if(row >=0 && row < height && column >=0 && column < width) canvas[row][column] = true; } /** * Clear a pixel * @param row The row of the pixel. * @param column The column of the pixel. */ protected void clearPixel(int row, int column) { if(row >=0 && row < height && column >=0 && column < width) canvas[row][column] = false; } /** * Get the area of this shape. Area is the number of pixel set in this * @return The area. */ public int getArea() { int area = 0; shape. for(boolean [] row: canvas) for(boolean pixel: row) if(pixel) ++area; } return area; /* (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { String drawing = ""; for(boolean [] row: canvas) { if(drawing.length() > 0) //...

Words: 704 - Pages: 3

Premium Essay

Objective-C Research Paper

...Research of Objective-C October 9, 2012 Introduction There is little doubt in today’s dynamic and fast moving technology market that Objective-C is a powerful, high-level, flexible programming language that has been around since the early 1980s and has the staying power to last a long time. Objective-C is an extension of the programming language C developed by Brad Cox and Tom Love to support the object oriented features of Smalltalk another programming language. Objective-C is the main language from which Apple’s MAC OS X for Desktops and laptops and iOS for iPhones and iPads are derived. There have been variants to this language as well, Objective-C++ and Objective-C 2.0 which proves the sustainability of this language. Due its portability, Objective-C has shown its flexibility and the ability to adapt to the ever changing and fast moving arena of mobile devices especially from Apple. What is Objective-C? Objective-C is a reflective programming language which aims to provide object orientated concepts and Smalltalk messaging to C. GNU Compiler Collection (GCC) provides a compiler for Objective-C, however due to the rich library support on OpenStep based operating systems (Mac OS X, IPhone, GNUstep) it is typically only used on these platforms. Objective-C is implemented as an augmentation to the C language. It is a superset of C which means that any Objective-C compiler can also compile C. To illustrate what Objective-C looks like as a language I will show you...

Words: 2068 - Pages: 9

Free Essay

Human Computer

...26/11/2012 Coursework 2 - overview G54IHC Introduction to Human-Computer Interaction Coursework 2 – ‘Evaluate your interface’ Dr. Gail Hopkins • Evaluate your interface • Worth 50% of your overall mark for this course • Consists of: – Group report – 60% of your coursework mark – Individual report – 40% of your coursework mark • Working in same groups as previously • Using the interface you have developed for CW1 – So I hope it’s ready! Coursework 2 – Group Activity • You must evaluate your prototype in 2 ways 1. 2. Using a method that utilises actual users, the ‘cooperative evaluation’ process discussed in today’s online lecture Using a ‘cognitive walkthrough’ (each member of the group should do this individually) Coursework 2 – Group Activity • You can do the cognitive walk-through evaluation in your own time – or using the lecture time we are not using at the end of term • You can also do the cooperative evaluation with live users in your own time – but you will have to find your own participants – it’s probably easier to get it done in next week’s lecture. • Next week we have 2 lecture slots available. – You must attend both sessions – Monday 9am Groups 1-12 will evaluate their interfaces (others act as participants) – Monday 12noon Groups 13-25 will evaluate their interfaces (others act as participants) Coursework 2 – Cooperative Evaluation days • Use the participants made available to you • I would suggesting running at least 3 participants through...

Words: 611 - Pages: 3

Free Essay

Tesg

...java class loaders http://onjava.com/pub/a/onjava/2005/01/26/classloading.html 1. Bootstrap classes: the runtime classes in rt.jar, internationalization classes in i18n.jar, and others. Whenever a new JVM is started by typing java MyMainClass, the "bootstrap class loader" is responsible for loading key Java classes like java.lang.Object and other runtime code into memory first. The runtime classes are packaged inside of theJRE\lib\rt.jar file. 1. Installed extensions: classes in JAR files in the lib/ext directory of the JRE, and in the system-wide, platform-specific extension directory (such as /usr/jdk/packages/lib/ext on the Solaris™ Operating System, but note that use of this directory applies only to Java™ 6 and later). We can store extension libraries, those that provide features that go beyond the core Java runtime code, in the path given by the java.ext.dirs property. The ExtClassLoader is responsible for loading all .jar files kept in the java.ext.dirs path 1. The class path: classes, including classes in JAR files, on paths specified by the system property java.class.path. If a JAR file on the class path has a manifest with the Class-Path attribute, JAR files specified by the Class-Path attribute will be searched also. By default, the java.class.path property's value is ., the current directory. You can change the value by using the -classpath or -cpcommand-line options, or setting the CLASSPATH environment variable. The command-line options override...

Words: 295 - Pages: 2

Premium Essay

A Java Applet Paper

...A Java Applet Paper BY DuWoyn Snipe A Java applet is an applet delivered to the users in the form of Java bytecode. Java applets can run in a web browser using a Java Virtual Machine or Sun’s Applet Viewer, a stand-alone tool for testing applets. What this means is that is that it is own program language that is different than JavaScript, but we will get into that later on. Java applet is program language that is written in different types of bytecode, other than just the normal Java language, it is also written in Jython, JRuby, or Eiffel. Now the Java applet that I found is http://www.schubart.net/rc / which is a simple Rubik’s Cube Applet that allows you to play with the Rubik’s Cube. The way that it allows you to play is by at first scrambling the cube, then you gets to try and rebuild it back. Now it keeps track of how many moves that you do in order to try and figure it out. The controls for the Rubik’s Cube are very simple in the fact that the mouse is how you make the cube move. Now you can see that as you play with it the Rubik’s Cube moves very fast to the point that you almost don’t see it change. This is due to the fact that the Java applet is much faster than normal JavaScript by about 2011 times. Now this is a big deal if you are going to be running 3D graphics for the fact that they will run in real time and not slow down in order to load. Now with that last part in mind I believe that Java applet enhances a website for the fact that it allows for much...

Words: 487 - Pages: 2