This document describes the build output of a Java application project in NetBeans. It explains that JAR files on the project's classpath will be copied to the dist/lib folder and added to the Class-Path element in the manifest file. It provides instructions for running the project from the command line by going to the dist folder and typing "java -jar ''.''"
6. Week 4 Individual
Assignment/build/classes/Program/HalsCommission.classpackag
e Program;
publicsynchronizedclass HalsCommission {
public void HalsCommission();
publicstatic void main(String[]);
}
Week 4 Individual
Assignment/build/classes/Program/NumberGeneration.classpack
age Program;
publicsynchronizedclass NumberGeneration {
public void NumberGeneration();
publicstatic void main(String[]);
}
Week 4 Individual
Assignment/build/classes/Program/NumberGenerator1.classpack
age Program;
publicsynchronizedclass NumberGenerator1 {
public void NumberGenerator1();
publicstatic void main(String[]);
}
Week 4 Individual
Assignment/build/classes/Program/SalesCommission.classpacka
ge Program;
publicsynchronizedclass SalesCommission {
private int fixedSalary;
private double commission;
public int sales;
private double salesTarget;
private double acceleration;
7. public void SalesCommission();
public void SalesCommission(int, double);
public void setFixedSalary(int);
public void setCommission(double);
public void setSalesTarget(double);
public void setAcceleration(double);
public int getFixedSalary();
public double getCommission();
public double getSalesTarget();
public double getAcceleration();
}
Week 4 Individual Assignment/Main/CopyLibs/org-netbeans-
modules-java-j2seproject-copylibstask.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.2
Created-By: 1.7.0_25-b15 (Oracle Corporation)
NetBeans-Own-Library: true
org/netbeans/modules/java/j2seproject/copylibstask/Bundle.prop
erties
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR
THIS HEADER.
#
# Copyright 1997-2010 Oracle and/or its affiliates. All rights
reserved.
8. #
# Oracle and Java are registered trademarks of Oracle and/or its
affiliates.
# Other names may be trademarks of their respective owners.
#
# The contents of this file are subject to the terms of either the
GNU
# General Public License Version 2 only ("GPL") or the
Common
# Development and Distribution License("CDDL") (collectively,
the
# "License"). You may not use this file except in compliance
with the
# License. You can obtain a copy of the License at
# http://www.netbeans.org/cddl-gplv2.html
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
# specific language governing permissions and limitations under
the
# License. When distributing the software, include this License
Header
# Notice in each file and include the License file at
# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
# particular file as subject to the "Classpath" exception as
provided
# by Oracle in the GPL Version 2 section of the License file
that
# accompanied this code. If applicable, add the following below
the
# License Header, with the fields enclosed by brackets []
replaced by
# your own identifying information:
# "Portions Copyrighted [year] [name of copyright owner]"
#
# Contributor(s):
#
# The Original Software is NetBeans. The Initial Developer of
9. the Original
# Software is Sun Microsystems, Inc. Portions Copyright 1997-
2006 Sun
# Microsystems, Inc. All Rights Reserved.
#
# If you wish your version of this file to be governed by only
the CDDL
# or only the GPL Version 2, indicate your decision by adding
# "[Contributor] elects to include this software in this
distribution
# under the [CDDL or GPL Version 2] license." If you do not
indicate a
# single choice of license, a recipient has the option to
distribute
# your version of this file under either the CDDL, the GPL
Version 2 or
# to extend the choice of license to its licensees as provided
above.
# However, if you add GPL Version 2 code and therefore,
elected the GPL
# Version 2 license, then the option applies only if the new code
is
# made subject to such option by the copyright holder.
TXT_README_FILE_NAME=README.TXT
TXT_README_FILE_CONTENT======================
===n
BUILD OUTPUT DESCRIPTIONn
========================n
n
When you build an Java application project that has a main
class, the IDEn
automatically copies all of the JARn
files on the project's classpath to your project's dist/lib folder.
The IDEn
also adds each of the JAR files to the Class-Path element in the
10. applicationn
JAR file's manifest file (MANIFEST.MF).n
n
To run the project from the command line, go to the dist folder
andn
type the following:n
n
java -jar '"{0}'" n
n
To distribute this project, zip up the dist folder (including the
lib folder)n
and distribute the ZIP file.n
n
Notes:n
n
* If two JAR files on the project classpath have the same name,
only the firstn
JAR file is copied to the lib folder.n
* Only JAR files are copied to the lib folder.n
If the classpath contains other types of files or folders, these
files (folders)n
are not copied.n
* If a library on the project's classpath also has a Class-Path
elementn
specified in the manifest,the content of the Class-Path element
has to be onn
the project's runtime path.n
* To set a main class in a standard Java project, right-click the
project noden
in the Projects window and choose Properties. Then click Run
and enter then
class name in the Main Class field. Alternatively, you can
manually type then
class name in the manifest Main-Class element.
11. org/netbeans/modules/java/j2seproject/copylibstask/CopyFiles.c
lasspackage org.netbeans.modules.java.j2seproject.copylibstask;
publicsynchronizedclass CopyFiles extends
org.apache.tools.ant.Task {
private java.io.File todir;
private java.io.File iftldtodir;
private String files;
private String manifestproperty;
public void CopyFiles();
public void execute() throws
org.apache.tools.ant.BuildException;
private boolean containsTLD(java.io.File);
public String getFiles();
public void setFiles(String);
public java.io.File getToDir();
public void setToDir(java.io.File);
public java.io.File getIfTLDToDir();
public void setIfTLDToDir(java.io.File);
public String getManifestProperty();
public void setManifestProperty(String);
static void <clinit>();
}
org/netbeans/modules/java/j2seproject/copylibstask/CopyLibs.cl
asspackage org.netbeans.modules.java.j2seproject.copylibstask;
publicsynchronizedclass CopyLibs extends
org.apache.tools.ant.taskdefs.Jar {
privatestaticfinal String LIB = lib;
privatestaticfinal String ATTR_CLASS_PATH = Class-Path;
privatestaticfinal String MANIFEST = META-
INF/MANIFEST.MF;
privatestaticfinal String INDEX = META-INF/INDEX.LIST;
privatestaticfinal String UTF_8 = UTF-8;
privatestaticfinal String UTF8 = UTF8;
org.apache.tools.ant.types.Path runtimePath;
12. org.apache.tools.ant.types.Path excludeFromCopy;
private boolean rebase;
public void CopyLibs();
public void
setRuntimeClassPath(org.apache.tools.ant.types.Path);
public org.apache.tools.ant.types.Path
getRuntimeClassPath();
public void
setExcludeFromCopy(org.apache.tools.ant.types.Path);
public org.apache.tools.ant.types.Path
getExcludeFromCopy();
public boolean isRebase();
public void setRebase(boolean);
public void setEncoding(String);
public void execute() throws
org.apache.tools.ant.BuildException;
private boolean rebase(java.io.File, java.io.File);
privatestatic boolean
isSigned(org.apache.tools.ant.taskdefs.Manifest);
privatestatic void copy(java.io.InputStream,
java.io.OutputStream) throws java.io.IOException;
privatestatic boolean isUTF8(String);
static void <clinit>();
}
org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml
Week 4 Individual Assignment/Main/nblibraries.properties
libs.CopyLibs.classpath=
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-
copylibstask.jar
libs.CopyLibs.displayName=CopyLibs Task
13. libs.CopyLibs.prop-version=2.0
Week 4 Individual Assignment/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Week 4 Individual Assignment/nbproject/build-impl.xml
14.
15.
16.
17.
18.
19. Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
42. Must select one file in the IDE or set run.class
Must select one file in the IDE or set debug.class
Must select one file in the IDE or set debug.class
43. Must set fix.includes
This target only works when run from inside the NetBeans
IDE.
Must select one file in the IDE or set profile.class
This target only works when run from inside the NetBeans
IDE.
This target only works when run from inside the NetBeans
IDE.
45. Must select one file in the IDE or set run.class
Must select some files in the IDE or set test.includes
Must select one file in the IDE or set run.class
Must select one file in the IDE or set applet.url
48. Some tests failed; see details above.
Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.class
Must select some method in the IDE or set test.method
Some tests failed; see details above.
49. Must select one file in the IDE or set test.class
Must select one file in the IDE or set test.class
Must select some method in the IDE or set test.method
Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
50.
51. Week 4 Individual Assignment/nbproject/genfiles.properties
build.xml.data.CRC32=bad3aaa2
build.xml.script.CRC32=680dfd8e
[email protected]
# This file is used by a NetBeans-based IDE to track changes in
generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will
never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=bad3aaa2
nbproject/build-impl.xml.script.CRC32=0adc71e4
nbproject/[email protected]
Week 4 Individual
Assignment/nbproject/private/private.properties
compile.on.save=true
user.properties.file=C:UsersDk
DukesAppDataRoamingNetBeans8.0build.properties
53. # This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection
transport:
#debug.transport=dt_socket
debug.classpath=
${run.classpath}
debug.test.classpath=
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/JohnDoe.jar
dist.javadoc.dir=${dist.dir}/javadoc
54. excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=
${javac.classpath}:
${build.classes.dir}
javac.test.processorpath=
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
56. project.
# You may also define separate properties like run-sys-
prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-
prop.name=value:
run.jvmargs=
run.test.classpath=
${javac.test.classpath}:
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
Week 4 Individual Assignment/nbproject/project.xml
org.netbeans.modules.java.j2seproject
JohnDoe
57. Mainnblibraries.properties
Week 4 Individual
Assignment/src/com/toy/anagrams/lib/StaticWordLibrary.javaW
eek 4 Individual
Assignment/src/com/toy/anagrams/lib/StaticWordLibrary.java/*
* Copyright (c) 2010, Oracle.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or wi
thout
* modification, are permitted provided that the following condi
tions are met:
*
* * Redistributions of source code must retain the above copyr
ight notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above c
opyright
* notice, this list of conditions and the following disclaimer i
n
* the documentation and/or other materials provided with the
distribution.
* * Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products de
rived
* from this software without specific prior written permission
.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HO
LDERS AND CONTRIBUTORS
58. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHA
NTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EV
ENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRE
CT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE
S (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVI
CES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CA
USED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILIT
Y, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
F SUCH DAMAGE.
*/
/* Anagram Game Application */
package com.toy.anagrams.lib;
/**
* Implementation of the logic for the Anagram Game applicatio
n.
*/
finalclassStaticWordLibraryextendsWordLibrary{
privatestaticfinalString[] WORD_LIST ={
"abstraction",
"ambiguous",
"arithmetic",
62. /**
* Gets the word at a given index in its scrambled form.
* @param idx index of required word
* @return word at that index in its scrambled form
*/
publicString getScrambledWord(int idx){
return SCRAMBLED_WORD_LIST[idx];
}
/**
* Gets the number of words in the library.
* @return the total number of plain/scrambled word pairs in
the library
*/
publicint getSize(){
return WORD_LIST.length;
}
/**
* Checks whether a user's guess for a word at the given inde
x is correct.
* @param idx index of the word guessed
* @param userGuess the user's guess for the actual word
* @return true if the guess was correct; false otherwise
*/
publicboolean isCorrect(int idx,String userGuess){
return userGuess.equals(getWord(idx));
}
}
Week 4 Individual
Assignment/src/com/toy/anagrams/lib/WordLibrary.javaWeek 4
Individual
Assignment/src/com/toy/anagrams/lib/WordLibrary.java/*
63. * Copyright (c) 2010, Oracle.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or wi
thout
* modification, are permitted provided that the following condi
tions are met:
*
* * Redistributions of source code must retain the above copyr
ight notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above c
opyright
* notice, this list of conditions and the following disclaimer i
n
* the documentation and/or other materials provided with the
distribution.
* * Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products de
rived
* from this software without specific prior written permission
.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HO
LDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHA
NTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EV
ENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRE
CT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE
S (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVI
64. CES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CA
USED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILIT
Y, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
F SUCH DAMAGE.
*/
/* Anagram Game Application */
package com.toy.anagrams.lib;
/**
* Interface defining logic for the Anagram Game application.
*/
publicabstractclassWordLibrary{
/**
* Constructor for subclasses.
*/
protectedWordLibrary(){
}
/** Getter for the default implementation of the WordLibrary.
* @return some default implementation of WordLibrary
*/
publicstaticWordLibrary getDefault(){
returnStaticWordLibrary.DEFAULT;
}
/**
* Gets the word at a given index.
* @param idx index of required word
* @return word at that index in its natural form
65. */
publicabstractString getWord(int idx);
/**
* Gets the word at a given index in its scrambled form.
* @param idx index of required word
* @return word at that index in its scrambled form
*/
publicabstractString getScrambledWord(int idx);
/**
* Gets the number of words in the library.
* @return the total number of plain/scrambled word pairs in
the library
*/
publicabstractint getSize();
/**
* Checks whether a user's guess for a word at the given inde
x is correct.
* @param idx index of the word guessed
* @param userGuess the user's guess for the actual word
* @return true if the guess was correct; false otherwise
*/
publicabstractboolean isCorrect(int idx,String userGuess);
}
Week 4 Individual
Assignment/src/com/toy/anagrams/ui/About.form
Week 4 Individual
Assignment/src/com/toy/anagrams/ui/About.javaWeek 4
Individual Assignment/src/com/toy/anagrams/ui/About.java/*
* Copyright (c) 2010, Oracle.
66. * All rights reserved.
*
* Redistribution and use in source and binary forms, with or wi
thout
* modification, are permitted provided that the following condi
tions are met:
*
* * Redistributions of source code must retain the above copyr
ight notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above c
opyright
* notice, this list of conditions and the following disclaimer i
n
* the documentation and/or other materials provided with the
distribution.
* * Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products de
rived
* from this software without specific prior written permission
.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HO
LDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHA
NTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EV
ENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRE
CT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE
S (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVI
CES; LOSS OF USE, DATA, OR
67. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CA
USED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILIT
Y, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
F SUCH DAMAGE.
*/
/* Anagram Game Application */
package com.toy.anagrams.ui;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionListener;
import javax.swing.JDialog;
import javax.swing.JFrame;
/**
* About dialog of the Anagram Game application.
*/
publicclassAboutextendsJDialog{
/** Creates new form About */
publicAbout(JFrame parent){
super(parent,true);
initComponents();
pack();
Rectangle parentBounds = parent.getBounds();
Dimension size = getSize();
// Center in the parent
int x =Math.max(0, parentBounds.x +(parentBounds.width -
size.width)/2);
68. int y =Math.max(0, parentBounds.y +(parentBounds.height -
size.height)/2);
setLocation(newPoint(x, y));
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this
method is
* always regenerated by the Form Editor.
*/
privatevoid initComponents(){//GEN-BEGIN:initComponents
java.awt.GridBagConstraints gridBagConstraints;
mainPanel =new javax.swing.JPanel();
copyrightTextArea =new javax.swing.JTextArea();
closeButton =new javax.swing.JButton();
getContentPane().setLayout(new java.awt.GridBagLayout(
));
setDefaultCloseOperation(javax.swing.WindowConstants.
DISPOSE_ON_CLOSE);
setTitle("About Anagrams");
mainPanel.setLayout(new java.awt.GridBagLayout());
mainPanel.setBorder(new javax.swing.border.EmptyBorde
r(new java.awt.Insets(11,11,12,12)));
copyrightTextArea.setBackground(javax.swing.UIManager
.getDefaults().getColor("Panel.background"));
copyrightTextArea.setColumns(25);
copyrightTextArea.setEditable(false);
copyrightTextArea.setLineWrap(true);
copyrightTextArea.setRows(8);
copyrightTextArea.setText("AnagramsnnCopyright (c) 20
03 Irritable Enterprises, Inc.");
70. }//GEN-END:initComponents
privatevoid closeButtonActionPerformed(java.awt.event.Action
Event evt){//GEN-FIRST:event_closeButtonActionPerformed
setVisible(false);
dispose();
}//GEN-LAST:event_closeButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton closeButton;
private javax.swing.JTextArea copyrightTextArea;
private javax.swing.JPanel mainPanel;
// End of variables declaration//GEN-END:variables
}
Week 4 Individual
Assignment/src/com/toy/anagrams/ui/Anagrams.form
Week 4 Individual
Assignment/src/com/toy/anagrams/ui/Anagrams.javaWeek 4
Individual
Assignment/src/com/toy/anagrams/ui/Anagrams.java/*
* Copyright (c) 2010, Oracle.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or wi
thout
* modification, are permitted provided that the following condi
tions are met:
*
* * Redistributions of source code must retain the above copyr
ight notice,
71. * this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above c
opyright
* notice, this list of conditions and the following disclaimer i
n
* the documentation and/or other materials provided with the
distribution.
* * Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products de
rived
* from this software without specific prior written permission
.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HO
LDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHA
NTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EV
ENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRE
CT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE
S (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVI
CES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CA
USED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILIT
Y, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
F SUCH DAMAGE.
*/
72. /* Anagram Game Application */
package com.toy.anagrams.ui;
import com.toy.anagrams.lib.WordLibrary;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
/**
* Main window of the Anagram Game application.
*/
publicclassAnagramsextendsJFrame{
publicstaticvoid main(String[] args){
/* Set the Nimbus look and feel */
//<editor-
fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay wit
h the default look and feel.
* For details see http://download.oracle.com/javase/tutori
al/uiswing/lookandfeel/plaf.html
*/
try{
javax.swing.UIManager.LookAndFeelInfo[] installedLo
okAndFeels=javax.swing.UIManager.getInstalledLookAndFeels
();
for(int idx=0; idx<installedLookAndFeels.length; idx++)
if("Nimbus".equals(installedLookAndFeels[idx].getName())){
javax.swing.UIManager.setLookAndFeel(installed
LookAndFeels[idx].getClassName());
break;
74. guessedWord.requestFocusInWindow();
// Center in the screen
Dimension screenSize =Toolkit.getDefaultToolkit().getScreenSi
ze();
Dimension frameSize = getSize();
setLocation(newPoint((screenSize.width -
frameSize.width)/2,
(screenSize.height - frameSize.width)/2));
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this
method is
* always regenerated by the Form Editor.
*/
privatevoid initComponents(){//GEN-BEGIN:initComponents
java.awt.GridBagConstraints gridBagConstraints;
mainPanel =new javax.swing.JPanel();
scrambledLabel =new javax.swing.JLabel();
scrambledWord =new javax.swing.JTextField();
guessLabel =new javax.swing.JLabel();
guessedWord =new javax.swing.JTextField();
feedbackLabel =new javax.swing.JLabel();
buttonsPanel =new javax.swing.JPanel();
guessButton =new javax.swing.JButton();
nextTrial =new javax.swing.JButton();
mainMenu =new javax.swing.JMenuBar();
fileMenu =new javax.swing.JMenu();
aboutMenuItem =new javax.swing.JMenuItem();
exitMenuItem =new javax.swing.JMenuItem();
setTitle("Anagrams");
addWindowListener(new java.awt.event.WindowAdapter()
{
91. Polytechnic School
Ira A. Fulton Schools of Engineering
Arizona State University
Mesa, Arizona
Arizona State University Polytechnic
School
Ira A. Fulton Schools of Engineering Nicholas
Lindquist
2
Graphic Information Technology
GIT 335 – Computer Systems Technology
3 semester hours credit
Course Prerequisites: Junior standing
92. Course Co-requisites: None
Course Description and Scope:
This 7.5-week course provides a professional orientation to
computers and
computer-related technology. Topics addressed include
information technology, the
Internet and World Wide Web, software, hardware, operating
systems, applications,
networks, personal technology, and databases.
Textbook:
Using Information Technology: A Practical Introduction to
Computers
& Communications by Brian Williams and Stacey Sawyer – 10th
Edition-Complete
McGraw-Hill 2010 – ISBN 978-0-07-351683-7
Course Assignments:
Each individual student is required to complete all assignments
to their
designated Blackboard drop boxes by the assigned times.
Students are to utilize the
book, streamed lecture notes, and documentation, discussion
board, and complete all
class activities.
Work is not accepted via email. All assignments MUST be
submitted through the
corresponding drop box in Blackboard.
Performance Outcomes:
93. mputer technology is
used in the
workplace and social media settings.
operating systems and
categories of software applications.
computer systems.
wide web, to
include the conducting a personal search in the deep web.
safeguards to protect
against Cyber Threats and Hackers.
3
and information
systems used in business and industry.
Course Evaluation:
Quizzes (3) 25%
Assignments 20%
Mid-Term Exam 15%
Technical Project 20%
94. Comprehensive Final Exam 20%
Total Grade 100%
The grading scale for this class is the following:
Grade Percentage
A + 98-100%
A 90- 97%
B + 88- 89%
B 80- 87%
C + 78- 79%
C 70- 77%
D 60- 69%
E/F Below 60%
If students are active in the online course, I will factor the level
of participation into any
final grade decisions.
LATE
WORK
POLICY
Late work is accepted but will incur a 50% penalty. After one
week’s time has elapsed,
late work is not accepted at all. Please submit your work on
time.
95. PLEASE NOTE: The final due date for the course is Friday,
October 10th at midnight for
the final exam. As soon the clock strikes 12:00a.m. Saturday,
October 11th, the course
is really and truly over- no late work whatsoever will be
accepted after that time.
Communicating With the Instructor
This course uses the discussion board for general questions
about the course. Prior to
posting a question, please check the syllabus, announcements,
existing posts, and
course emails. If you do not find an answer, post your question.
You are encouraged to
respond to the questions of your classmates.
4
Email questions of a personal nature to your instructor or
assigned TA.
Internet Course Delivery:
Nick Lindquist will deliver this course on-line using the
Pearson Learning Studio.
Students at ASU may use the MyASU link through the
following URL:
http://my.asu.edu/
96. or through the ASU Main web page under student online
services.
This asynchronous method of course delivery will allow
students access to the
course 24 hours a day, seven days a week. Students may check
grades or download
course documents as needed.
Academic Conduct and Responsibility:
You are expected to execute all course assignments and
activities in accordance
with the Arizona State University Academic Integrity Standard
(See General Catalog
page 80). The following Internet URL’s provide access to these
ASU policies.
AIP: http://www.asu.edu/studentlife/judicial/integrity.html
Code of Conduct: http://www.asu.edu/aad/manuals/sta/sta104-
01.html
Outcomes Assessment for the Graphic Information Technology
Curriculum:
The Graphic Information Technology curriculum has been
validated by the
Industrial Advisory Board and is accredited by the National
Association of Industrial
Technology (NAIT). As part of the accreditation review
process, and the continuous
improvement process of the curriculum the desired outcomes for
graduates of the GIT
program are presented in each course syllabus. The following
97. matrix illustrates the
outcomes for which GIT 538 will address and the measure of
assessment. Following the
course specific outcomes and competencies is the master list of
GIT Outcomes
Assessment.
5
Department of Technology Entrepreneurship and Innovation
Management
Arizona State University at the Polytechnic Campus
Graphic Information Technology Program
Course Outcomes
O1 Develop a commitment and understanding of trade customs
in graphic information business and industry.
O2 Acquire in-depth knowledge of print, web, and technical
media processes.
O3 Acquire in-depth knowledge of digital graphics file formats
and their applications.
98. O4 Acquire in-depth knowledge color systems and their
applications.
O5 Demonstrate mastery of both Macintosh and Windows
operating systems as they are applied to the delivery of graphic
information.
O6 Demonstrate job-ready skills in raster and vector
technologies, page layout, pre-media, and multimedia.
O7 Demonstrate an understanding of analog and digital
measurement as applied to the organization of graphic data.
Department of Technology Entrepreneurship and Innovation
Management
Arizona State University at the Polytechnic campus
Graphic Information Technology Program
GIT 335 Course Outcomes/Competencies
Assessment Measures
Outcomes and Competencies O
n
-L
in
e
Le
ct
u
103. Program Outcome -O5 Demonstrate mastery of both
Macintosh and Windows operating systems as they are
applied to the delivery of graphic information.
X X X
Program Outcome - O13 Propose graphic information
technology solutions in terms of workflow, equipment,
personnel, and budgets.
X X
Program Outcome - O14 Create content for digital and
print media.
X
Program Outcome - O15 Synthesize technical information
into written and graphical publications utilizing computer-
based page composition software.
X X X
Program Outcome - O20 - Understand the importance of
life long learning in graphic information careers. X
Program Outcome - O21 Appreciate the importance of
graphic information technology across all segments of
society.
X
Program Outcome - O22 Understand the legal and ethical
ramifications of decisions concerning the creation and
104. distribution of graphic information.
X X X
6
O8 Evaluate task parameters, propose alternate graphic
solutions, and choose the optimum solution based on established
criteria.
O9 Analyze complex graphic information projects and propose
solutions in terms of management issues and production
workflow.
O10 Assume positions on teams organized to propose and create
solutions for graphic information tasks.
O11 Demonstrate the ability to sketch and execute solutions to
graphic problems.
O12 Plan and execute publications intended for print, web, and
technical media.
O13 Propose graphic information technology solutions in terms
of workflow, equipment, personnel, and budgets.
O14 Create content for digital and print media.
O15 Synthesize technical information into written and graphical
publications utilizing computer-based page composition
105. software.
O16 Synthesize technical information into oral presentations
utilizing computer-based presentation software.
O18 Synthesize technical information into publications utilizing
computer-based presentation software.
O19 Synthesize technical information into multimedia
presentations utilizing computer-based presentation software.
O20 Understand the importance of life long learning in graphic
information careers.
O21 Appreciate the importance of graphic information
technology across all segments of society.
O22 Demonstrate a Cognitive Understanding of the legal and
ethical ramifications of decisions concerning the creation and
distribution of graphic information.
O23 Demonstrate a Cognitive Understanding of the importance
of professional technical associations in career development.
O24 Apply methods of quality and project management.
O25 Demonstrate a working knowledge of estimating and cost
analysis processes/software applications related to economics of
the graphic technologies.
O26 Develop a commitment and understanding of quality
assurance practices in printing and graphic business and
industry.
106. Course Outline
I. Introduction to Information Technology
A. Information Technology: The Future Now
B. Infotech: Cell Phones, E-Mail, the Internet
C. The All Purpose Machine
D. How to Build Your Own PC
E. Where is Information Technology Headed
II. The Internet and the World Wide Web
A. Connecting to the Internet
B. How Does the Internet Work
C. The World Wide Web
D. E-Mail
E. Telephony, Multimedia, Webcasting, Blogs, E-Commerce
7
F. The Intrusive Internet: Spamming, Phishing, Cookies,
Spyware
III. Software: Tools for Productivity and Creativity
A. System Software
B. The Operating System
C. Device Drivers and Utility Programs
D. Application Software
E. Word Processing and Spread sheets
F. Database Software
G. Specialty Software
107. IV. Hardware: CPU and Storage - Multimedia
A. Microchips
B. The System Unit
C. Secondary Storage
D. Future Developments in Processing and Storage
V. Hardware for Input and Output
A. Input Hardware
B. Output Hardware
C. The Future of Input and Output Technology
VI. Communications, Networks, and Safeguards
A. From Analog to the Digital Age
B. Networks
C. Wired Communications Media
D. Wireless Communications Media
E. Cyber Threats, Hacker, and Safeguards
VII. Personal Technology
A. Convergence, Portability, and Personalization
B. MP3, High-Tech Radio
C. Digital Cameras
D. Digital Assistants and Tablet PC
E. The New Television
F. Smartphones
G. Video Game Systems
VIII. Databases and Information Systems
108. A. Managing Files
B. Database Management Systems
C. Database Models
D. Data Mining
E. Databases and E-Commerce
8
F. Information Systems in Organizations
G. Artificial Intelligence
H. Ethics of Using Databases, Privacy and Identity Theft
IX. The Challenges of the Digital Age
A. Truth Issues: Data Manipulation
B. Security Issues
C. Quality of Life
D. Economic and Political Issues
LockmanCommission.javaLockmanCommission.javaimport java.
util.Scanner;//Imports the scanner utility which we will use for
//user input.
import java.text.DecimalFormat;//Imports the formatting for dec
imal.
/**
* This program calculates an employee's Annual Compensation
109. for
* Lockman Computer Sales.
*/
publicclassLockmanCommission{
publicstaticvoid main(String[]args)
{
doubleAnnual;//This will hold the amount of annual sales given
doubleAnnual2;
doubleTotal;
doubleDifference;
Difference=0;
DecimalFormat dollar =newDecimalFormat("#,##0.00");//Decim
al formatting.
finalint NUM_EMPLOYEES =2;//Number of employees.
double[]Sales=newdouble[NUM_EMPLOYEES];
Scanner keyboard =newScanner(System.in);
//////////////////////////////////////////////////
StringEmployee1;
System.out.println ("----------------------------");
System.out.print("Please enter employee LAST NAME ONLY: "
);
Employee1= keyboard.next();
System.out.print("Please enter Annual Sales : $");
Annual= keyboard.nextDouble();
SalesCommissionFinal=
newSalesCommission(Annual);//Creating a new instance of our
class.
110. System.out.println(Employee1);
System.out.println ("Total Compensation $"//Printing to the use
r.
+ dollar.format(Final.getTotal()));//Formatting and calling the
Sales[0]=Final.getTotal();
System.out.println ("----------------------------");
//////////////////////////////////////////////////
StringEmployee2;
System.out.println ("----------------------------");
System.out.print("Please enter employee LAST NAME ONLY: "
);
Employee2= keyboard.next();
System.out.print("Please enter Annual Sales : $");
Annual2= keyboard.nextDouble();
SalesCommissionFinal2=
newSalesCommission(Annual2);//Creating a new instance of our
class.
System.out.println(Employee2);
System.out.println ("Total Compensation $"//Printing to the use
r.
+ dollar.format(Final2.getTotal()));//Formatting and calling the
Sales[1]=Final2.getTotal();
System.out.println ("----------------------------");
///////////////////////////////////////////////////
112. /**
* This class computes the Total Annual Compensation for an e
mployee
* based on salary, commission rate, and annual sales with new i
ncentive.
* It also presents the employee with a table showing potential c
ommission.
*/
publicclassSalesCommission{//Declaring my class name.
privatedoubleSalary,//Salary of employee.
Commission,//Commission rate of employee.
Annual,//Annual Sales.
Total;//Total yearly compensation.
privatevoid setSalary()//Setting the Salary as a static value.
{
Salary=120000;
}
privatevoid setCommission()//Setting the Commission as a stati
c value.
{
Commission=.06;
}
113. /**
* From what I understand, this allows me to call the Annual
* variable in the next file.
*/
publicSalesCommission(double A)
{
Annual= A;
calculateTotal();//Declares my method name.
}
privatevoid calculateTotal()//Defines my method, Calculation.
{
setSalary();
setCommission();
if(Annual<400000)//If statements have been added to perform n
ew calculations.
Total=Salary;
if((Annual>400000)&&(Annual<=500000))
Total=Salary+(Commission*Annual);
if(Annual>500000)
Total=Salary+((Commission*1.25)*(Annual));
}
publicdouble getTotal()//Declaring the getTotal method.
{
returnTotal;//Instructing the machine to output the value for Tot
al.
}