...Summary In instructions and usability testing assignment, I tested the UNH student’s ability to connect to the UNH secure network based on the instruction I wrote. In this project, six UNH students participated, there of them were from class and the remaining three were out of class students. In overall, out of class testing went faster than in-class testing, mainly because for out-of-class testing, the instruction was revised based on feedback from fellow classmates. In both in-class and out-of-class testing, there weren’t any network or computer problems and everything went as planned, and everyone finished the task under 4 minutes (table 1). In average, in-class testing toke 216 seconds (3 minutes and 36 seconds), while out-of- class testing...
Words: 330 - Pages: 2
...OBJECT ORIENTED PROGRAMMING IN JAVA ‐ EXERCISES CHAPTER 1 1. Write Text‐Based Application using Object‐Oriented Approach to display your name. // filename: Name.java // Class containing display() method, notice the class doesnt have a main() method public class Name { public void display() { System.out.println("Mohamed Faisal"); } } // filename: DisplayName.java // place in same folder as the Name.java file // Class containing the main() method public class DisplayName { public static void main(String[] args) { Name myname = new Name(); // creating a new object of Name class myname.display(); // executing the display() method in the Name class } } 2. Write a java Applet to display your age. // filename: DisplayNameApplet.java import java.applet.Applet; // import necessary libraries for an applet import java.awt.Graphics; public class DisplayNameApplet extends Applet { public void paint(Graphics g) { g.drawString("Mohamed Faisal", 50, 25); } } // filename: DisplayNameApplet.htm // place in same folder as the compiled DisplayNameApplet.class file Displaying my Name CHAPTER 2 3. Write a program that calculates and prints the product of three integers. // filename: Q1.java import java.util.Scanner; // import Scanner libraries for input public class Q1 { public static void main(String[] args) { Scanner input = new Scanner (System.in); int number1; int number2; int number3; System.out.println("Enter the First Number"); www.oumstudents...
Words: 3130 - Pages: 13
...I have written a code that needs to increment my employee object by 1 for each instance of the class Employee.I am using a variable private static int numEmployee = 0; My program runs fine, but it keeps giving me total employees = "2" and "3" for employee1 and employee2, and I am not sure what I am doing wrong. Please look at this code and offer any help !!! This is my first post, so not sure if this format is correct or not. I used Visual Studio 2010 for C# to compile. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Help { class Employee { private string firstName; private string lastName; private char gender; private int dependents; private double annualSalary; private double pay; public static int numEmployees = 0; // created static variable public const string DEFAULT_FIRST = " not given"; public const string DEFAULT_LAST = " not given"; public const char DEFAULT_GENDER = 'U'; public const int DEFAULT_DEPENDENTS = 0; private const double DEFAULT_ANNUALSALARY = 20000; public Employee() { FirstName = DEFAULT_FIRST; LastName = DEFAULT_LAST; Gender = DEFAULT_GENDER; Dependents = DEFAULT_DEPENDENTS; AnnualSalary = DEFAULT_ANNUALSALARY; numEmployees++; // incremented numEmployees } public Employee(string first, string last, char gen, int dep, double salary) { DisplayEmployeeInformation(first, last, gen, dep, salary); numEmployees++; //incremented numEmployees } ~Employee() ...
Words: 565 - Pages: 3
...design provided. 6. Software engineers use “OOP” as an acronym for “organized operational programming”. 7. The term “Javadoc” refers to the process of “doctoring” Java code so that it runs more efficiently. 8. Software engineers use “UML” as an acronym for “Unified Modeling Language”. 9. UML diagrams are used to represent classes and the relationships among them. 10. The “is-a” relationship between classes is called composition. 11. The “contains-a” relationship between classes is called aggregation. 12. The “has-a” relationship between classes is called inheritance. 1 Test Bank 2 13. A “mutable” class is one whose objects can be modified by the objects of other classes. 14. An extension of a mutable class is also mutable. 15. An extension of a immutable class is also immutable. Select the best answer: During which stage of a software project are the software components determined? 1. a. b. c. d. e. f. 2. User support is part of which stage of a software project? a. b. c. d. e. f. 3. feasibility study requirements analysis...
Words: 1904 - Pages: 8
...Mohammed Ozayr Abdul Kader Grade: 12A Information Technology PAT Phase 2 Context Database Design: -ToyDistributionTBL -StockActivityTBL -WorkerTBL -Table Relationship Role of Database: GUI Design: -HCI Principles -Components TOE Chart: -Table Data Structure: -All Data types used OOP: -Classes and Objects -Class Diagram IPO Design and Error Catching: Table:- -Input -Process -Output -Validation & Integrity -Error Message Testing: Database Design: StockActivityTBL | Field Name | Data Type | Size | PK/FK | Distribution Number | Text | 8 | PK | DistrictID | Text | 10 | FK | WorkerID | Text | 6 | FK | DonationID | text | 6 | FK | Failed Donations | Number | Integer | | Total Donations | Text | 15 | | ToyDistributionTBL | Field Name | Data Type | Size | PK/FK | DistrictID | Text | 10 | PK | Area of Donation | Text | 20 | | Age of Child | Number | Integer | | Donation Details | Text | 20 | | Quantity | Number | Integer | | Date of Distribution | Date | Short Date | | WorkerTBL | Field Name | Data Type | Size | PK/FK | WorkerID | Text | 6 | PK | Surname | Text | 15 | | FirstName | Text | 15 | | Gender | Text | 6 | | Age | Number | Integer | | ContactNumber | Text | 10 | | DonationTBL | Field Name | Data Type | Size | PK/FK | DonationID | Text | 6 | PK | FirstName | Text | 15 | | Surname | Text | 15 | | Age | Number | Integer | | ContactNumber | Text | 10 | | Address...
Words: 1069 - Pages: 5
...Package ‘quantmod’ July 24, 2015 Type Package Title Quantitative Financial Modelling Framework Version 0.4-5 Date 2015-07-23 Depends xts(>= 0.9-0), zoo, TTR(>= 0.2), methods Suggests DBI,RMySQL,RSQLite,timeSeries,its,XML,downloader Description Specify, build, trade, and analyse quantitative financial trading strategies. LazyLoad yes License GPL-3 URL http://www.quantmod.com https://github.com/joshuaulrich/quantmod BugReports https://github.com/joshuaulrich/quantmod/issues NeedsCompilation yes Author Jeffrey A. Ryan [aut, cph], Joshua M. Ulrich [cre, ctb], Wouter Thielen [ctb] Maintainer Joshua M. Ulrich Repository CRAN Date/Publication 2015-07-24 21:10:42 R topics documented: quantmod-package addADX . . . . . . addBBands . . . . addCCI . . . . . . addExpiry . . . . . addMA . . . . . . addMACD . . . . . addROC . . . . . . addRSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
Words: 4206 - Pages: 17
...C++ Data Structures Chapter 1 10) What is the difference between an object and an object class? An object class provides the blue print for an object. It will define everything and all the variables and methods available to an object (at least in non-dynamic languages). An object is an instance of an object class, which provides a living breathing representation of that blue print. Example #1 A Toyota Camry or another particular make might be an instance of the class car. Example #2 A house might be an instance of the class Building 17) The following program has three separate errors, each of which would cause an infinite loop. As a member of the inspection team, you could save the programmer a lot of testing time by finding the errors during the inspection. Can you help? Error 1: The while clause is missing the {} brackets around the next 3 lines. Error 2: The Increment function is getting passed the variable nextNumber by value rather than reference, which will not increment count in the main() function. Error 3: The program is not referencing stdlib 18) Is there any way a single programmer (for example, a student working alone on a programming assignment) can benefit from some of the ideas behind the inspection process? Yes, I believe anyone could benefit from the inspection process, regardless of the size of the team. The whole philosophy behind the inspection process is to review a program to ensure that each piece is working...
Words: 347 - Pages: 2
...The Math.random creates a random number with the double data type. 3. public static void main(String[] args) { System.out.println(max(1,2)); } public static double max(int num1, double num2) { if (num1 > num2) return num1; else return num2; } public static double max(double num1, int num2) { if (num1 > num2) return num1; else return num2; } 4. It is a way of writing code; you either start at the top and work your way down or begin at the outcome and work in reverse. 5. Simpler program, reusing methods, better facilitating teamwork, easier developing, debugging, and testing. 6. Method Variable 7. for (int i = 0; i >= 0; i--) { JOptionPane.showMessageDialog(null, i); } 8. Array is fixed while ArrayList can change its size to what is needed. 9. package com.java2novice.algos; public class MyInsertionSort { public static void main(String[] args) { int[] input = { 4, 2, 9, 6, 23, 12, 34, 0, 1 }; insertionSort(input); } private static void printNumbers(int[] input) { for (int i = 0; i < input.length; i++) { System.out.print(input[i] + ", "); } System.out.println("\n"); } public static void insertionSort(int array[]) { int n = array.length; for (int j = 1; j < n; j++) { int key = array[j]; int i = j-1; while ( (i > -1) && ( array [i] > key ) ) { array [i+1] = array [i]; i--; } array[i+1] = key; printNumbers(array); } } } 10. A linear search just looks down the...
Words: 301 - Pages: 2
...If you were to ask me, “In what way have you achieved honors credit for this class?” I would say that I’ve have managed to complete all of the assignments on time, along with contributing to classroom discussions. Also, during group work, I have managed to help other students with topics they don’t seem to fully understand, which makes us, as a group, to all be confident in these topics. Even though I haven’t been doing satisfactorily well on tests, I feel like I have improved in my communication skills, and also have grown more in this class to be confident in my thoughts and understandings. Therefore, I believe that I truly deserve honors credit in Modern World History. Way back towards the beginning of the school year, you assigned the class...
Words: 311 - Pages: 2
...Busy Lifestyle People with busy lifestyles, varying schedules, and extreme time restrictions may think that getting their college degree is impossible. WGU is a school that accommodates just these sorts of people. WGU offers all of the advantages of a traditional university in an online package. It is the perfect school for students with busy lifestyles because these students are able to complete individual classes at their own pace, arrange their own hours, and do their schooling from home or wherever they feel most comfortable without sacrificing the support structure of a standard university. WGU gives its students the ability to progress through individual classes at their own pace. This allows students that struggle in a particular class to spend extra time learning the material without being left behind. Students that excel in a particular subject are also allowed the freedom to progress quickly through these classes and move on to other subjects. This system...
Words: 913 - Pages: 4
...The University of Melbourne Department of Computer Science and Software Engineering 433-254 Software Design Semester 2, 2003 Answers for Lab 2 Week 3 1. Writing Simple Classes: a) In Java systems, there is only one class with the ‘main’ function, which initiates the execution of the whole system. Therefore, in order to test individual classes (i.e. unit testing), developers are usually writing a simple class with a main function (also known as a driver class) that simply calls all different functions of a target class and prints the results. Your task is to download the file “Keyboard.java” from: www.cs.mu.oz.au/254/Keyboard/Keyboard.html and write a simple driver program that tests the following methods from Keyboard.java: readInt() readString() readLong() readWord() readFloat() readChar() readDouble() readBoolean() Sample Answer: // A class to execute one or more Keyboard methods class Test { public static void main(String[] args) { System.out.print("Please enter a string: "); String str = Keyboard.readString(); System.out.println("String = " + str); System.out.println(); System.out.print("Please enter a word: "); String word = Keyboard.readWord(); System.out.println("word = " + word); System.out.println(); System.out.print("Please enter a character: "); char ch = Keyboard.readChar(); System.out.println("char = " + ch); System.out.println(); System.out.print("Please enter a boolean (true/false): "); boolean bool = Keyboard.readBoolean(); System.out.println("boolean...
Words: 1072 - Pages: 5
...VERSANT Dattabase Fundamenttalls Manuall VERSANT Da abase Fundamen a s Manua June 2003 VERSANT Dattabase Fundamenttalls Manuall VERSANT Da abase Fundamen a s Manua June 2003 VERSANT Database Fundamentals Manual This page is intentionally blank. 2 VERSANT Database Fundamentals Manual Table of Contents Chapter 1: System Description ..............................................................................................................8 Versant Developer Suite 6.0: An Overview..........................................................................................9 VERSANT Features ........................................................................................................................12 Storage Architecture ......................................................................................................................22 Software Structure .........................................................................................................................24 Language Interfaces .......................................................................................................................25 System Usage Notes.......................................................................................................................28 Chapter 2: Objects.............................................................................................................................34 Object Types.................................
Words: 44539 - Pages: 179
...Blue Pelican Java by Charles E. Cook Version 3.0.5h Copyright © 2004 - 2008 by Charles E. Cook; Refugio, Tx (All rights reserved) 1-1 “Blue Pelican Java,” by Charles E. Cook. ISBN 1-58939-758-4. Published 2005 by Virtualbookworm.com Publishing Inc., P.O. Box 9949, College Station, Tx 77842, US. ©2005, Charles E. Cook. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, recording or otherwise, without the prior written permission of Charles E. Cook. Manufactured in the United States of America. Preface You will find this book to be somewhat unusual. Most computer science texts will begin with a section on the history of computers and then with a flurry of definitions that are just “so many words” to the average student. My approach with Blue Pelican Java is to first give the student some experience upon which to hang the definitions that come later, and consequently, make them more meaningful. This book does have a history section in Appendix S and plenty of definitions later when the student is ready for them. If you will look at Lesson 1, you will see that we go right to work and write a program the very first day. The student will not understand several things about that first program, yet he can immediately make the computer do something useful. This work ethic is typical of the remainder of the book. Rest assured that full understanding...
Words: 31284 - Pages: 126
...C# Language Specification Version 4.0 Notice © 1999-2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Visual Basic, Visual C#, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries/regions. Other product and company names mentioned herein may be the trademarks of their respective owners. Table of Contents 1. Introduction 1 1.1 Hello world 1 1.2 Program structure 2 1.3 Types and variables 4 1.4 Expressions 6 1.5 Statements 8 1.6 Classes and objects 12 1.6.1 Members 12 1.6.2 Accessibility 13 1.6.3 Type parameters 13 1.6.4 Base classes 14 1.6.5 Fields 14 1.6.6 Methods 15 1.6.6.1 Parameters 15 1.6.6.2 Method body and local variables 16 1.6.6.3 Static and instance methods 17 1.6.6.4 Virtual, override, and abstract methods 18 1.6.6.5 Method overloading 20 1.6.7 Other function members 21 1.6.7.1 Constructors 22 1.6.7.2 Properties 23 1.6.7.3 Indexers 23 1.6.7.4 Events 24 1.6.7.5 Operators 24 1.6.7.6 Destructors 25 1.7 Structs 25 1.8 Arrays 26 1.9 Interfaces 27 1.10 Enums 29 1.11 Delegates 30 1.12 Attributes 31 2. Lexical structure 33 2.1 Programs 33 2.2 Grammars 33 2.2.1 Grammar notation 33 2.2.2 Lexical grammar 34 2.2.3 Syntactic grammar 34 2.3 Lexical analysis 34 2.3.1 Line terminators 35 2.3.2 Comments 35 2.3.3 White space 37 2.4 Tokens 37 2.4.1 Unicode character escape sequences 37 2.4.2 Identifiers 38 2.4.3 Keywords 39 ...
Words: 47390 - Pages: 190
...rename the project by renaming the folder from roman_numerals_buggy to roman_numeral_soln after extracting the zip file. The purpose of this code is to convert Arabic numerals into Roman numerals. Make an instance of RomanNumerals and invoke the method toRoman(int n). Enter a number in the Arabic notation and it will convert it to a Roman numeral. For example “17” will be converted to “XVII”.You will notice a test suite that we provide with the code. Run the test suite by right-clicking on RomanNumeralsTest and choosing Test All as shown in Figure 6.3 of the book. Alternatively, you can click on the Run Tests button as shown in Figure 6.2 of the book, if you have enabled the ‘Show unit testing tools’ preference. To enable it, go to Tools > Preferences > Miscellaneous, and select ‘Show unit testing tools’. You will notice a total of eight tests of which two fail. Your first task in this assignment is to study the given code, identify why the two tests fail, and correct the code. On studying the code further, you will notice a few more bugs/limitations in the provided code (i.e. the provided code will not give the correct Roman numeral conversion for some numbers). Identify them and correct the code to handle those situations also. Also, the test suite itself has a bug, i.e. it will flag an error in a particular case even when the code gives the right answer. Identify that situation and correct it. Add...
Words: 568 - Pages: 3