Java assignment help
GuiReflectApp/build.xml
Builds, tests, and runs the project GuiReflectApp.
GuiReflectApp/build/built-jar.properties
#Fri, 06 Mar 2020 09:57:03 -0700 C\:\\Users\\Lenovo\ -\ Home\\OneDrive\\NetBeansProjects\\GuiReflectApp=
GuiReflectApp/build/classes/edu/t10/GuiReflectApp.class
package edu.t10; public synchronized class GuiReflectApp { public void GuiReflectApp(); public static void main(String[]); }
GuiReflectApp/build/classes/edu/t10/model/Student.class
package edu.t10.model; public synchronized class Student { private String name; public void Student(); public String getName(); public void setName(String); public String getViewClass(); public String toString(); }
GuiReflectApp/build/classes/edu/t10/view/MainFrame.class
package edu.t10.view; public synchronized class MainFrame extends javax.swing.JFrame { private StudentView view; private edu.t10.model.Student model; public void MainFrame(); public edu.t10.model.Student getModel(); public void setModel(edu.t10.model.Student); private void initializeComponents(); private void layoutComponents(); }
GuiReflectApp/build/classes/edu/t10/view/StudentView.class
package edu.t10.view; public synchronized class StudentView extends javax.swing.JLabel { private edu.t10.model.Student model; public void StudentView(); public edu.t10.model.Student getModel(); public void setModel(edu.t10.model.Student); private void updateDisplay(); }
GuiReflectApp/dist/GuiReflectApp.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0 Ant-Version: Apache Ant 1.9.7 Created-By: 1.8.0_111-b14 (Oracle Corporation) Class-Path: X-COMMENT: Main-Class will be added automatically by build Main-Class: edu.t10.GuiReflectApp
edu/t10/GuiReflectApp.class
package edu.t10; public synchronized class GuiReflectApp { public void GuiReflectApp(); public static void main(String[]); }
edu/t10/model/Student.class
package edu.t10.model; public synchronized class Student { private String name; public void Student(); public String getName(); public void setName(String); public String getViewClass(); public String toString(); }
edu/t10/view/MainFrame.class
package edu.t10.view; public synchronized class MainFrame extends javax.swing.JFrame { private StudentView view; private edu.t10.model.Student model; public void MainFrame(); public edu.t10.model.Student getModel(); public void setModel(edu.t10.model.Student); private void initializeComponents(); private void layoutComponents(); }
edu/t10/view/StudentView.class
package edu.t10.view; public synchronized class StudentView extends javax.swing.JLabel { private edu.t10.model.Student model; public void StudentView(); public edu.t10.model.Student getModel(); public void setModel(edu.t10.model.Student); private void updateDisplay(); }
GuiReflectApp/dist/README.TXT
======================== BUILD OUTPUT DESCRIPTION ======================== When you build an Java application project that has a main class, the IDE automatically copies all of the JAR files on the projects classpath to your projects dist/lib folder. The IDE also adds each of the JAR files to the Class-Path element in the application JAR files manifest file (MANIFEST.MF). To run the project from the command line, go to the dist folder and type the following: java -jar "GuiReflectApp.jar" To distribute this project, zip up the dist folder (including the lib folder) and distribute the ZIP file. Notes: * If two JAR files on the project classpath have the same name, only the first JAR file is copied to the lib folder. * Only JAR files are copied to the lib folder. If the classpath contains other types of files or folders, these files (folders) are not copied. * If a library on the projects classpath also has a Class-Path element specified in the manifest,the content of the Class-Path element has to be on the projects runtime path. * To set a main class in a standard Java project, right-click the project node in the Projects window and choose Properties. Then click Run and enter the class name in the Main Class field. Alternatively, you can manually type the class name in the manifest Main-Class element.
GuiReflectApp/manifest.mf
Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build
GuiReflectApp/nbproject/build-impl.xml
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 Must set javac.includes No tests executed. Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent Must select some files in the IDE or set javac.includes To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" Must select one file in the IDE or set run.class 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 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. This target only works when run from inside the NetBeans IDE. 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 Must select some files in the IDE or set javac.includes 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. 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
GuiReflectApp/nbproject/genfiles.properties
build.xml.data.CRC32=8ec167d9 build.xml.script.CRC32=397d082d build.xml.stylesheet.CRC32=8064a381@1.80.1.48 # 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=8ec167d9 nbproject/build-impl.xml.script.CRC32=9064bd0e nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
GuiReflectApp/nbproject/private/private.properties
user.properties.file=C:\\Users\\Lenovo - Home\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
GuiReflectApp/nbproject/private/private.xml
file:/C:/Users/Lenovo%20-%20Home/OneDrive/NetBeansProjects/GuiReflectApp/src/edu/t10/view/StudentView.java file:/C:/Users/Lenovo%20-%20Home/OneDrive/NetBeansProjects/GuiReflectApp/src/edu/t10/view/MainFrame.java file:/C:/Users/Lenovo%20-%20Home/OneDrive/NetBeansProjects/GuiReflectApp/src/edu/t10/model/Student.java file:/C:/Users/Lenovo%20-%20Home/OneDrive/NetBeansProjects/GuiReflectApp/src/edu/t10/GuiReflectApp.java
GuiReflectApp/nbproject/project.properties
annotation.processing.enabled=true annotation.processing.enabled.in.editor=false annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # 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} # Files in build.classes.dir which should be excluded from distribution jar dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/GuiReflectApp.jar dist.javadoc.dir=${dist.dir}/javadoc excludes= includes=** jar.compress=false javac.classpath= # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false javac.external.vm=true javac.processorpath=\ ${javac.classpath} javac.source=1.8 javac.target=1.8 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} javac.test.processorpath=\ ${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} javadoc.noindex=false javadoc.nonavbar=false javadoc.notree=false javadoc.private=false javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= main.class=edu.t10.GuiReflectApp manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} # Space-separated list of JVM arguments used when running the 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
GuiReflectApp/nbproject/project.xml
org.netbeans.modules.java.j2seproject GuiReflectApp
GuiReflectApp/src/edu/t10/GuiReflectApp.java
GuiReflectApp/src/edu/t10/GuiReflectApp.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
edu
.
t10
;
import
edu
.
t10
.
model
.
Student
;
import
edu
.
t10
.
view
.
MainFrame
;
/**
* A single frame application that displays a Student model with a StudentView
*
*
@author
rickb
*/
public
class
GuiReflectApp
{
/**
* Main entry point for this application
*
*
@param
args the command line arguments (ignored)
*/
public
static
void
main
(
String
[]
args
)
{
Student
model
=
new
Student
();
model
.
setName
(
"Rick"
);
// Change this to using reflection.
MainFrame
frame
=
new
MainFrame
();
frame
.
setModel
(
model
);
}
}
GuiReflectApp/src/edu/t10/model/Student.java
GuiReflectApp/src/edu/t10/model/Student.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
edu
.
t10
.
model
;
/**
* A simple (MVC) model for a Student
*
*
@author
rickb
*/
public
class
Student
{
private
String
name
;
public
Student
()
{
this
.
name
=
""
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getViewClass
()
{
return
""
;
// TODO
}
@
Override
public
String
toString
()
{
return
name
;
}
}
GuiReflectApp/src/edu/t10/view/MainFrame.java
GuiReflectApp/src/edu/t10/view/MainFrame.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
edu
.
t10
.
view
;
import
edu
.
t10
.
model
.
Student
;
import
javax
.
swing
.
JFrame
;
import
javax
.
swing
.
WindowConstants
;
/**
* The main frame, which contains a child Student View component
*
*
@author
rickb
*/
public
class
MainFrame
extends
JFrame
{
// TODO
private
StudentView
view
;
private
Student
model
;
public
MainFrame
()
{
super
(
"Assignment 10"
);
initializeComponents
();
layoutComponents
();
this
.
setDefaultCloseOperation
(
WindowConstants
.
EXIT_ON_CLOSE
);
setSize
(
400
,
400
);
setVisible
(
true
);
}
public
Student
getModel
()
{
return
model
;
}
public
void
setModel
(
Student
model
)
{
this
.
model
=
model
;
view
.
setModel
(
model
);
}
private
void
initializeComponents
()
{
// TODO load via reflection
view
=
new
StudentView
();
}
private
void
layoutComponents
()
{
getContentPane
().
add
(
view
);
}
}
GuiReflectApp/src/edu/t10/view/StudentView.java
GuiReflectApp/src/edu/t10/view/StudentView.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
edu
.
t10
.
view
;
import
edu
.
t10
.
model
.
Student
;
import
javax
.
swing
.
JLabel
;
/**
* A simple view that displays a Student model.
*
*
@author
rickb
*/
public
class
StudentView
extends
JLabel
{
/**
* The Student model displayed in this view.
*/
private
Student
model
;
public
Student
getModel
()
{
return
model
;
}
/**
* Display the given model in this view
*
*
@param
model
*/
public
void
setModel
(
Student
model
)
{
this
.
model
=
model
;
updateDisplay
();
}
/**
* Display the current model in this view.
*/
private
void
updateDisplay
()
{
// TODO: Use reflection here.
setText
(
model
.
getName
());
}
}