SlideShare a Scribd company logo
1 of 38
IT 511: Final Project Guidelines and Grading Guide
Overview
Your final project for this course is the creation of a Virtual
World Java application that results in a virtual world, complete
with an object that will act as a human
clone. A virtual world with a human clone would not be
complete without additional objects for interaction, so you will
be responsible for creating a “ShoutBox”
and another object that will keep your human clone from getting
lonely, and a virtual world application that will test your
objects. Your final deliverables will
include your working code (which your instructor will run in
order to review your virtual world) as well as an annotated
version of your written code that explains
your reasoning for choices, how the code meets the given
specifications for your project, how you ensured the accuracy
and workability of your code, and
methods used for testing and debugging.
The project is divided into four milestones, which will be
submitted at various points throughout the course to scaffold
learning and ensure quality final
submissions. These milestones will be submitted in Modules
Two, Five, Seven, and Eight. The final submission will be
submitted in Module Nine.
In this assignment you will demonstrate your mastery of the
following course outcomes:
-oriented programs using
primitive data types, variables, data structures, and object-
oriented principles
object
instance variables and behaviors
decision control structures, and loops
results
-oriented programs for accuracy in
program functionality
-oriented code with comments that articulate
the purpose and behavior of code for various audiences
Prompt
In creating your virtual world, you will need to create a
MyClone class that will represent a virtual clone, another class
that will represent a ShoutBox, and
another class of your choice. The class of your choice can be
anything you want to exist in your virtual world (a cat, a bird, a
computer, etc.). This project is a
prototype and there will not be any graphics, so you will create
an application that unit tests the functionality of your three
classes (your MyClone class, your
ShoutBox class, and the class of your choice).
Specifications for MyClone
Feel free to add additional instance variables and behaviors, but
your clone object must have instance variables firstName,
lastName, and an introduction()
method. The firstName and lastName instance variables will
hold your first and last names. You will demonstrate your
understanding of encapsulation by
protecting your instance variables by making them private and
by creating getters and setter methods for all instance variables.
You should have at least one
constructor created that initializes all instance variables. The
introduction() method will introduce you to the virtual world by
displaying a greeting, your full
name, and anything else you would want to say.
Partial class diagram for the MyClone object:
Specifications for ShoutBox
The ShoutBox object will allow you to shout messages into your
virtual world. Your ShoutBox will have two ways of generating
messages:
1. You can select from a list of canned messages to shout, or
2. You can have the ShoutBox generate a random message for
you.
You must use data structures Array, ArrayList, or a HashMap to
store the message data.
Canned messages: One data structure will store the canned
messages. You can load this data structure with canned
messages of your choosing. The
shoutOutCannedMessage() method will loop through the data
structure to first display all canned messages and allow the user
to select one. The
shoutOutCannedMessage() will return the selected message
String. This String will be displayed in the virtual world. For
now, your virtual world will be the
output window.
Random messages: To generate random messages, you need to
have a data structure that holds a list of subjects, another data
structure that holds a list of
objects, another that holds a list of verbs, another that holds a
list of adverbs, and another that holds a list of adjectives. The
lists you create can hold as many
words as you would like. The shoutOutRandomMessage()
method will use a random number generator that selects one
word from each data structure to form a
random message. Random messages will be in the following
form: Subject - Verb - Adjective - Object – Adverb.
The generated message String will be returned. The String will
be displayed by the ShoutBox in the virtual world. For now,
your virtual world will be the output
window.
MyClone
-firstName
-lastName
introduction()
Partial class diagram for the ShoutBox object:
Examples of canned messages stored in the canned messages
data structure (you can store as many canned messages as you
would like):
Example of subjects stored in the subjects data structure:
“I”
“You”
Example of objects stored in the objects data structure:
“course”
“homework”
Example of verbs stored in the verbs data structure:
“studying”
“eating”
“sneezing”
Example of adjectives stored in the adjectives data structure:
“funny”
“prickly”
“hard”
“awesome”
Example of adverbs stored in the adverbs data structure:
ShoutBox
String shoutOutRandomMessage()
String shoutOutCannedMessage()
“Hello World”
“I am studying”
“I am at work”
“quickly”
“everywhere”
Specifications for Your Additional Object
You will create another object of your choosing to add to your
virtual world. Your object should have at a minimum two (2)
instance variables and one (1)
method. You will demonstrate your understanding of
encapsulation by protecting your instance variables by making
them private and by creating getters and
setter methods for all instance variables. You should have at
least one constructor created that initializes all instance
variables.
Specifications for Virtual World Application
You will create a virtual world application that will test your
MyClone, ShoutBox, and the object you decided to add to your
virtual world. Because this is a simple
prototype, you will not actually create any graphics to represent
the objects in the virtual world. Any displayed information will
simply be displayed in the
output window.
Submit your Java application by submitting all .java files and at
least four screenshots that demonstrate you tested the
application.
While the listed number of instance variables and methods are
the minimum number required for each class, you are free to
create additional.
Specifically, the following critical elements must be addressed:
I. Program Functionality and Alignment
a. Make sure your entire program functions correctly and that
there are no exceptions or compile errors
b. In writing your code, make sure that you are meeting or
exceeding all of the given specifications for each class.
Although you will be graded on
coverage of stated requirements, you are free to use your
creative touch in developing additional classes and objects with
additional instance
variables should you wish.
He reads red book
quickly!
c. Create the unit test application and use it to test the
functionality of each class. Submit the screenshots showing that
the code was tested.
II. Data Structure for Message Storage: Use data structures
(either Arrays, ArrayLists, or a HashMaps) to store the message
data in accordance with the
given specifications. You can use one type, or a mix of the
listed types of data structures for message storage. Specifically,
it should be one data structure
per word type (verb, subject, etc.), but you can choose to use a
HashMap for canned messages and maybe ArrayLists for the
use Arrays for all of them.
III. Methods and Instance variables
a. Method shoutOutCannedMessage() loops through the data
structure that stores the canned messages first to display all
canned messages and
allows the user to select one canned message.
b. The method shoutOutCannedMessage() will return the
selected message string.
c. Your shoutOutRandomMessage() method should use a random
number generator that selects one word from each data structure
to form a
random message. The random number generated should not
exceed the bounds of your data. In other words, if you only
have 5 words in a data
structure, the random number generated should not be an index
that has no word stored.
d. The method shoutOutRandomMessage() should return a
randomly generated message string in accordance with
specifications, in the form:
Subject - Verb - Adjective - Object - Adverb (for example,
“You read hard books quickly”).
e. Use the MyClone introduction() method to introduce your
clone to the virtual world by displaying a greeting, your full
name, and anything else
you would want to say.
f. MyClone class should include instance variables (at least
firstName and lastName) that are made private and have
associated getters (accessors)
and setters (mutators) for all instance variables.
g. You should build an additional class of your choice, which
should have at least 2 private instance variables with associated
getters (accessors) and
setters (mutators) and 1 method your choice.
IV. Test Application: You will create one application that will
test all three classes.
a. Perform a unit test of the MyClone to test all getters
(accessors) and setters (mutators)and method(s) of the class.
b. Perform a unit test of the ShoutBox to test all methods of the
class.
c. Perform a unit test of the additional class object to test all
getters (accessors) and setters (mutators) and method(s) of the
class.
V. In-Code Comments
a. Make sure your object-oriented code is accurately
documented to explain the purpose and behavior of the code.
b. Articulation of comments is clear and concise for the
audiences that may review it, including your instructor and
individuals that may need to
maintain or implement the code.
Milestones
Milestone One: MyClone Class
In Module Two, you will submit your Java class, MyClone. You
will create your initial version of the MyClone class. MyClone
class should have instance variables
firstName and lastName. The firstName and lastName instance
variables hold a value for first and last names respectively. You
will demonstrate your
understanding of encapsulation using the private specifier to
restrict access to your instance variables. This milestone is
graded with the Milestone One Rubric.
Feedback should be incorporated into the final project as
warranted.
Milestone Two: Message Array
In Module Five, you will submit your Java code that creates an
Array of String messages. Write an application that uses an
Array to store 10 messages of type
String. You will store this Array with 10 messages of your
choosing. For example, a message could be “I love Java the
programming language!” or another
message could be “I love Java the drink!” You may initialize
your Array with the messages or have the user enter the
messages. The choice is yours. Your Java
code will loop through the Array to iterate through your entire
list and display each message and allow the user to select one.
The shoutOutCannedMessage() will
return the selected message String. This milestone is graded
with the Milestone Two Rubric. Feedback should be
incorporated into the final project as
warranted.
Milestone Three: Programmer-Defined Class
In Module Seven, You will create a Virtual World application
as your final project. This Virtual World will have several
objects including a MyClone object and
another object of your choice. It would be an excellent idea to
review the Final Project Guidelines at this time. For this Third
Final Project Milestone, you will
finish development of your MyClone class and create another
class of your choice.
In Module Two, you started development of the MyClone class.
You will continue to develop the MyClone class by adding
accessor methods, mutator methods,
and an introduction() method. You will create an accessor and
mutator method for each instance variable declared in the
MyClone class. The introduction()
method will introduce yourself to the virtual world by
displaying a greeting, your first and last name, and anything
else you would want to say.
You will also create another class of your choice. Your
programmer-defined class should have at a minimum two
instance variables and one method. The instance
variables and method should be representative of the data and
behavior that objects of this class will have. You will
demonstrate your understanding of
encapsulation by declaring the instance variables as private and
by creating accessors and mutators for each instance variable.
You should have at least one
constructor created that initializes all instance variables.
Document your code. This milestone is graded with the
Milestone Three Rubric. Feedback should be
incorporated into the final project as warranted.
Milestone Four: ShoutBox Class With Methods
In Module Eight, you will create the ShoutBox class for your
Virtual World. Your ShoutBox class will have two methods:
Method shoutOutCannedMessage()will return type String.
The shoutOutCannedMessage will use an Array or an ArrayList
to store 10 messages of type String. For those of you who are
more advanced with your Java skills,
you could use a HashMap for the data structure. You can load
this data structure with 10 messages of your choosing. You can
initialize your Array or ArrayList
with the messages or have the user enter the messages. The
choice is yours. The shoutOutCannedMessage() will loop
through the data structure to first display
all canned messages and allow the user to select one. The
shoutOutCannedMessage() will return the selected message
String. Document your
shoutOutCannedMessage() method to explain the code.
Method shoutOutRandomMessage() method will return type
String.
The shoutOutRandomMessage() will use several Arrays or an
ArrayList to store words. You will have one data structure that
holds a list of words that are subjects,
another data structure that holds a list of words that are objects,
another that holds a list of verbs, another that holds a list of
adverbs, and another that holds a
list of adjectives. You can initialize your data structures with
words or have the user enter the words. The choice is yours.
The shoutOutRandomMessage() method will use a random
number generator that selects one word from each data structure
to form a random message. The
shoutOutRandomMessage() method will return the random
message as a String data type. Random messages will be of the
following form: Subject - Verb -
Adjective - Object - Adverb.
Document your shoutOutRandomMessage() method to explain
the code.
This milestone is graded with the Milestone Four Rubric.
Feedback should be incorporated into the final project as
warranted.
Final Submission: Virtual World Java Application
In Module Nine, you will submit all classes for the Virtual
World Java application. It should be a complete artifact, free of
compiler and run-time errors, and
contain all of the critical elements of the final product. You will
submit the following completed classes in addition to a class
that tests them: MyClone, ShoutBox,
the class you designed, and a test class. In your test class you
will have a main() method. This test class will represent your
virtual world application that will test
the MyClone, the ShoutBox, and the class you decided to create
in Module Seven. Document your code with comments. It
should reflect the incorporation of
feedback gained throughout the course. This submission will be
graded using the Final Project Rubric.
Deliverable Milestones
Milestone Deliverables Module Due Grading
1 MyClone Class Two Graded separately; Milestone One
Rubric
2 Message Array Five Graded separately; Milestone Two
Rubric
3 Programmer-defined Class Seven Graded separately;
Milestone Three Rubric
4 ShoutBox Class With Methods Eight Graded separately;
Milestone Four Rubric
Final Project: Virtual World Java
Application
Nine Graded separately; Final Project Rubric
Final Project Rubric
Requirements of Submission: Written components of projects
must follow these formatting guidelines when applicable:
double spacing, 12-point Times New
Roman font, one-inch margins, and discipline-appropriate
citations.
This activity uses an integrated rubric in Blackboard. Students
can view instructor feedback in the Grade Center. For more
information, review these instructions.
Instructor Feedback: Students can find their feedback in the
Grade Center or Turnitin.
Critical Elements Exemplary (100%) Proficient (90%) Needs
Improvement (70%) Not Evident (0%) Value
Program
Functionality
All functional and design
requirements are met and the
user interface is friendly,
handles invalid user
interactions, displays output in
a clear format, and is intuitive
Complete program functions
correctly, with no compile
errors and no exceptions
Complete program does not
function correctly
Program is not complete 10
Program Alignment Meets “Proficient” criteria and
code includes additional
instance variables or objects
that behave according to given
specifications
Complete code meets the
specifications and minimum
requirements for each class
Code is complete, but does not
meet all of the given
specifications and minimum
requirements for each class
Code is not complete
7
Unit Test Application Meets “Proficient” criteria and
unit test application behaves
like a true virtual world
Unit test application accurately
tests the functionality of each
class
Unit test application tests the
functionality of each class, but
not accurately
Unit test application does not
test the functionality of each
class
7
Data Structure for
Message Storage
Meets “Proficient” criteria and
generics are used to define the
type of any ArrayList or
HashMap; initialization of data
structures are flexible (user
enters the data instead of hard
coded initialized data)
Uses an Array, ArrayList, or a
HashMap to effectively store
massage data in accordance
with the given specifications
Uses an Array, ArrayList, or a
HashMap to effectively store
massage data, but not in
accordance with the given
specifications
Does not use an Array,
ArrayList, or a HashMap to
effectively store massage data
6
http://snhu-
media.snhu.edu/files/production_documentation/formatting/rubr
ic_feedback_instructions_student.pdf
shoutOutCannedMes
sage() Method
Meets “Proficient” criteria
substantiated with formatted
printing used to display all
canned messages from the
shoutOutCannedMessage()
method; the user interface
provided that allows user to
select a message is robust,
handles invalid entries, and
prevents the user from entering
an index that is beyond the
range of the indices for the
Array; loop uses length of Array
to control loop
Method loops through the data
structure that stores the canned
messages, displays all canned
messages, and allows user to
select one; method returns the
correct selected message string
Method insufficiently loops
through the data structure that
stores the canned messages,
does not display all canned
messages, or method
insufficiently allows user to
select one message
Method does not loop through
the data structure that stores
the canned messages
6
shoutOutRandomMe
ssage() Method
Meets “Proficient” criteria and
uses a different random
number for the index for each
data structure
Method correctly uses a
random number generator that
selects one word from each
data structure to form a
random message
Method incorrectly uses a
random number generator so
that it does not select one word
from each data structure to
form a random message
Method does not use a random
number generator
6
shoutOutRandomMe
ssage() Return
Meets “Proficient” criteria
substantiated with the correct
format used to return the
message string
Method returns a randomly
generated message in
accordance with the given
specifications and in the proper
string format
Method returns a randomly
generated message, but not in
accordance with specifications
or not in the proper string
format
Method does not return a
randomly generated message
6
MyClone Method
introduction()
Meets “Proficient” criteria
substantiated with formatted
printing used to display the
introduction; message displayed
is aesthetically pleasing;
introduction() method uses
getters or accessor methods to
get the current value of the first
name and last name instance
variables
Method correctly displays a
greeting, the full name of the
clone, and an introduction
statement for the virtual world
Method displays a greeting, the
full name of the clone, and an
introduction statement for the
virtual world, but not correctly
Method does not display a
greeting, the full name of the
clone, and an introduction
statement for the virtual world
6
MyClone Class
Instance variables
Meets “Proficient” criteria and
the class includes additional,
creative or real-world private
instance variables that follow
specifications
MyClone class includes required
instance variables that are
made private and have
associated getters and setters
MyClone class includes required
instance variables that are
made private but do not have
associated getters and setters
MyClone class does not include
the required instance variables
and the instance variables are
not made private
7
Additional Class Meets “Proficient” criteria and
the class objects are creative or
unique with private instance
variables that fit the object
The choice class has 2 private
instance variables with
associated getters and setters
and 1 successful method
The choice class has 2 private
instance variables with
associated getters and setters
and 1 method, but the method
is not successful or the instance
variables do not follow
specifications
The choice class does not have
2 private instance variables and
1 method
7
Unit Test: MyClone Meets “Proficient” criteria
substantiated with a user
interface that lets the user
interact with the application;
unit test application creates
more than one MyClone object
and tests all possible code paths
Unit test successfully tests all
getters and setters and
method(s) of the class
Unit test tests all getters and
setters and method(s) of the
class, but not successfully
Unit test does not test all
getters and setters and
method(s) of the class
6
Unit Test: ShoutBox Meets “Proficient” criteria
substantiated with a user
interface that allows the user to
interact with the application;
unit test application tests all
possible code paths
Unit test successfully tests all
methods of the class
Unit test tests all methods of
the class, but not successfully
Unit test does not test all
methods of the class
6
Unit Test: Additional
Class
Meets “Proficient” criteria
substantiated with user
interface that allows the user to
interact with the application;
unit test application creates
more than one of these objects
and tests all methods more
than once; unit test application
tests all possible code paths
Unit test successfully tests all
getters and setters and
method(s) of the class
Unit test tests all getters and
setters and method(s) of the
class, but not successfully
Unit test does not test all
getters and setters and
method(s) of the class
6
Code Documentation Meets “Proficient” criteria and
all methods have a header that
explains the purpose of the
method, the pre-conditions,
and the post-conditions
Code is accurately documented
to explain the purpose and
behavior of the code
Code is documented to explain
the purpose and behavior of
the code, but not always
accurately
Code is not documented to
explain the purpose and
behavior of the code
6
Articulation of
Comments
Meets “Proficient” criteria and
submission is properly cited,
free of errors related to
citations, grammar, spelling,
syntax, and organization and is
presented in a professional and
easy to read format
Articulation of comments is
clear and concise, using
appropriate jargon for all users
and viewers, with no major
errors related to citations,
grammar, spelling, syntax, or
organization
Articulation of comments is
clear and concise , but does not
use appropriate jargon for all
users and viewers or has major
errors related to citations,
grammar, spelling, syntax, or
organization that negatively
impact readability and
articulation of main ideas
Articulation of comments is not
clear and concise
8
Earned Total 100%
virtual_world final
Virtual World/.classpath
Virtual World/.project
Virtual World
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
Virtual World/.settings/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enable
d
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Virtual World/bin/VirtualWorldPack/Main.classpackage
VirtualWorldPack;
publicsynchronizedclass Main {
public void Main();
publicstatic void main(String[]);
}
Virtual World/bin/VirtualWorldPack/MyClone.classpackage
VirtualWorldPack;
publicsynchronizedclass MyClone {
private String firstName;
private String lastName;
public void MyClone();
public void MyClone(String, String);
public void introduction();
public void setFirstName(String);
public void setLastName(String);
public String getFirstName();
public String getLastName();
}
Virtual World/bin/VirtualWorldPack/MyComputer.classpackage
VirtualWorldPack;
publicsynchronizedclass MyComputer {
private String Mark;
private String OpSystem;
public void MyComputer();
public void MyComputer(String, String);
public void introduce();
public void setMark(String);
public void setOpSystem(String);
public String getMark();
public String getOpSystem();
}
Virtual World/bin/VirtualWorldPack/ShoutBox.classpackage
VirtualWorldPack;
publicsynchronizedclass ShoutBox {
java.util.ArrayList list;
public void ShoutBox();
public void shoutOutCannedMessage();
public void shoutOutRandomMessage();
}
Virtual World/src/VirtualWorldPack/Main.javaVirtual
World/src/VirtualWorldPack/Main.javapackageVirtualWorldPac
k;
publicclassMain{
publicstaticvoid main(String[] argv){
//Creat a new object from MyClone class
MyClone human =newMyClone();
//Creat a new object from MyComputer class
MyComputer laptop =newMyComputer();
//Creat a new object from ShoutBox class
ShoutBox genmess =newShoutBox();
//call the setter method to store the first name
human.setFirstName("Jack");
//call the setter method to store the last name
human.setLastName("Decaprio");
//call the method introduction() to display the name and greetin
g
human.introduction();
//call the setter method to store the mark
laptop.setMark("Lenovo");
//call the setter method to store the operating system
laptop.setOpSystem("Windows 8");
//call the introduce method to print the mark and system
laptop.introduce();
//calling the method to display the canned message
genmess.shoutOutCannedMessage();
//calling the method to display the random message
genmess.shoutOutRandomMessage();
}
}
Virtual World/src/VirtualWorldPack/MyClone.javaVirtual
World/src/VirtualWorldPack/MyClone.javapackageVirtualWorl
dPack;
publicclassMyClone{
privateString firstName ;
privateString lastName ;
/*The first constractor
* to initialize
* the first name
* and the last name with null */
publicMyClone(){
this.firstName =null;
this.lastName =null;
}
/*The second constractor
* with two parameter to
* initialize the firt
* name and the last name */
publicMyClone(String firstname,String lastname){
this.firstName = firstname;
this.lastName = lastname;
}
/* method will introduce
* you to the virtual world
* by displaying a greeting,
* your full
name, and anything else
you would want to say.
* */
publicvoid introduction(){
System.out.println("***************************Welcome T
o My Virtual World Java Application**********************
****");
System.out.println("My first name : "+getFirstName());
System.out.println("My last name : "+getLastName());
}
//method to set the first name of the object
publicvoid setFirstName(String firstname){
this.firstName = firstname;
}
//method to set the last name of the object
publicvoid setLastName(String lastname){
this.lastName = lastname ;
}
//method to get the first nameof the object
publicString getFirstName(){
returnthis.firstName;
}
//method to get the last name of the object
publicString getLastName(){
returnthis.lastName;
}
}
Virtual World/src/VirtualWorldPack/MyComputer.javaVirtual
World/src/VirtualWorldPack/MyComputer.javapackageVirtualW
orldPack;
publicclassMyComputer{
privateStringMark;
privateStringOpSystem;
/*The first constractor to
* initialize the two
* string variable with
* null*/
publicMyComputer(){
this.Mark=null;
this.OpSystem=null;
}
/*The second constractor with
* two prametre
* to store the information
* on the two private
* variable
* */
publicMyComputer(String mark,String system){
this.Mark= mark;
this.OpSystem= system;
}
/*The introduce() method
* to print the mark and
* the oprating system
* of my laptop
* */
publicvoid introduce(){
System.out.println("My computer mark : "+ getMark());
System.out.println("My computer operating system : "+ getOpS
ystem());
}
//setter method to store the mark on the variable
publicvoid setMark(String mark){
this.Mark= mark;
}
//setter method to store the operating system on the variable
publicvoid setOpSystem(String system){
this.OpSystem= system;
}
//getter method to output the mark on the window
publicString getMark(){
returnthis.Mark;
}
//getter method to output the operating system on the window
publicString getOpSystem(){
returnthis.OpSystem;
}
}
Virtual World/src/VirtualWorldPack/ShoutBox.javaVirtual
World/src/VirtualWorldPack/ShoutBox.javapackageVirtualWorl
dPack;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Random;
publicclassShoutBox{
ArrayList<String> list =newArrayList<>();
/*this method display all
* canned messages and
* allow the user
* to select one
*/
publicvoid shoutOutCannedMessage(){
System.out.println(" ");
System.out.println("***************List of canned message**
*************");
list.add(0,"1-Hello World.");
list.add(1,"2-I am studying.");
list.add(2,"3-I am at work.");
list.add(3,"4-I am fine.");
list.add(4,"5-I love java.");
list.add(5,"6-I am on my bed.");
list.add(6,"7-I am eating.");
list.add(7,"8-I use my laptop.");
list.add(8,"9-I am in the kitchen.");
list.add(9,"10-I am reading.");
int size = list.size();
for(int i=0;i<size;i++)
{
System.out.println(list.get(i));
System.out.println("---------------------------");
}
int selectedMess;
Scanner scanner =newScanner(System.in);
System.out.print("==> Please select one canned message by ent
er the index number : ");
System.out.print(" ");
selectedMess = scanner.nextInt();
System.out.println(list.get(selectedMess-1));
}
/*The shoutOutRandomMessage() method will
* use a random number generator that selects
* one word from each data structure to form a
random message. Random messages will be in the
following form: Subject - Verb - Adjective - Object –
Adverb
*/
publicvoid shoutOutRandomMessage(){
String[] subject={" He's"," I'm"," She"};
String[] verb={" eating"," catching"," studying"," caughing"};
String[] adjective={" funny"," hard"," good"," polite"};
String[] object={" course"," homework"," books"," dog"};
String[] adverb={" quickly. "," everywhere. "," accordingly. ","
awfully. "};
Random r =newRandom();//intialize a Random
int selectedElement = r.nextInt(subject.length);
for(int i=1; i<=1; i++)
{
String randomSentence=subject[selectedElement]+verb[selected
Element]+adjective[selectedElement]+object[selectedElement]+
adverb[selectedElement];
System.out.println(" ");
System.out.println("ShoutOut: "+ randomSentence );
}
}
}

More Related Content

Similar to IT 511 Final Project Guidelines and Grading Guide Ov.docx

Code snippets
Code snippetsCode snippets
Code snippetsSireesh K
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programmingsmumbahelp
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programmingsmumbahelp
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGProf Ansari
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPMCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPAli Shah
 
Unidad o informatica en ingles
Unidad o informatica en inglesUnidad o informatica en ingles
Unidad o informatica en inglesMarisa Torrecillas
 
Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder paramisoft
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworksMD Sayem Ahmed
 
P Training Presentation
P Training PresentationP Training Presentation
P Training PresentationGaurav Tyagi
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsSaurabh Narula
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller ColumnsJonathan Fine
 

Similar to IT 511 Final Project Guidelines and Grading Guide Ov.docx (20)

Code snippets
Code snippetsCode snippets
Code snippets
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
 
Design patterns
Design patternsDesign patterns
Design patterns
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPMCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
 
Unidad o informatica en ingles
Unidad o informatica en inglesUnidad o informatica en ingles
Unidad o informatica en ingles
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Java oop concepts
Java oop conceptsJava oop concepts
Java oop concepts
 
Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder
 
C++ to java
C++ to javaC++ to java
C++ to java
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworks
 
02 objective-c session 2
02  objective-c session 202  objective-c session 2
02 objective-c session 2
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller Columns
 
Java sessionnotes
Java sessionnotesJava sessionnotes
Java sessionnotes
 
Java basics
Java basicsJava basics
Java basics
 
Design pattern-presentation
Design pattern-presentationDesign pattern-presentation
Design pattern-presentation
 

More from priestmanmable

9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docx9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docxpriestmanmable
 
a 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docxa 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docxpriestmanmable
 
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docxpriestmanmable
 
92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docx92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docxpriestmanmable
 
A ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docxA ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docxpriestmanmable
 
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docxpriestmanmable
 
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docxpriestmanmable
 
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docxpriestmanmable
 
900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docx900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docxpriestmanmable
 
9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docx9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docxpriestmanmable
 
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docxpriestmanmable
 
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docxpriestmanmable
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docxpriestmanmable
 
800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docx800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docxpriestmanmable
 
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docxpriestmanmable
 
8.0 RESEARCH METHODS These guidelines address postgr.docx
8.0  RESEARCH METHODS  These guidelines address postgr.docx8.0  RESEARCH METHODS  These guidelines address postgr.docx
8.0 RESEARCH METHODS These guidelines address postgr.docxpriestmanmable
 
95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docx95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docxpriestmanmable
 
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docxpriestmanmable
 
8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docx8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docxpriestmanmable
 
8Network Security April 2020FEATUREAre your IT staf.docx
8Network Security  April 2020FEATUREAre your IT staf.docx8Network Security  April 2020FEATUREAre your IT staf.docx
8Network Security April 2020FEATUREAre your IT staf.docxpriestmanmable
 

More from priestmanmable (20)

9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docx9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docx
 
a 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docxa 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docx
 
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
 
92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docx92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docx
 
A ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docxA ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docx
 
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
 
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
 
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
 
900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docx900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docx
 
9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docx9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docx
 
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
 
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
 
800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docx800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docx
 
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
 
8.0 RESEARCH METHODS These guidelines address postgr.docx
8.0  RESEARCH METHODS  These guidelines address postgr.docx8.0  RESEARCH METHODS  These guidelines address postgr.docx
8.0 RESEARCH METHODS These guidelines address postgr.docx
 
95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docx95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docx
 
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
 
8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docx8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docx
 
8Network Security April 2020FEATUREAre your IT staf.docx
8Network Security  April 2020FEATUREAre your IT staf.docx8Network Security  April 2020FEATUREAre your IT staf.docx
8Network Security April 2020FEATUREAre your IT staf.docx
 

Recently uploaded

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 

Recently uploaded (20)

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 

IT 511 Final Project Guidelines and Grading Guide Ov.docx

  • 1. IT 511: Final Project Guidelines and Grading Guide Overview Your final project for this course is the creation of a Virtual World Java application that results in a virtual world, complete with an object that will act as a human clone. A virtual world with a human clone would not be complete without additional objects for interaction, so you will be responsible for creating a “ShoutBox” and another object that will keep your human clone from getting lonely, and a virtual world application that will test your objects. Your final deliverables will include your working code (which your instructor will run in order to review your virtual world) as well as an annotated version of your written code that explains your reasoning for choices, how the code meets the given specifications for your project, how you ensured the accuracy and workability of your code, and methods used for testing and debugging. The project is divided into four milestones, which will be submitted at various points throughout the course to scaffold learning and ensure quality final submissions. These milestones will be submitted in Modules Two, Five, Seven, and Eight. The final submission will be submitted in Module Nine. In this assignment you will demonstrate your mastery of the following course outcomes:
  • 2. -oriented programs using primitive data types, variables, data structures, and object- oriented principles object instance variables and behaviors decision control structures, and loops results -oriented programs for accuracy in program functionality -oriented code with comments that articulate the purpose and behavior of code for various audiences Prompt In creating your virtual world, you will need to create a MyClone class that will represent a virtual clone, another class that will represent a ShoutBox, and another class of your choice. The class of your choice can be anything you want to exist in your virtual world (a cat, a bird, a computer, etc.). This project is a prototype and there will not be any graphics, so you will create an application that unit tests the functionality of your three classes (your MyClone class, your ShoutBox class, and the class of your choice). Specifications for MyClone Feel free to add additional instance variables and behaviors, but
  • 3. your clone object must have instance variables firstName, lastName, and an introduction() method. The firstName and lastName instance variables will hold your first and last names. You will demonstrate your understanding of encapsulation by protecting your instance variables by making them private and by creating getters and setter methods for all instance variables. You should have at least one constructor created that initializes all instance variables. The introduction() method will introduce you to the virtual world by displaying a greeting, your full name, and anything else you would want to say. Partial class diagram for the MyClone object: Specifications for ShoutBox The ShoutBox object will allow you to shout messages into your virtual world. Your ShoutBox will have two ways of generating messages: 1. You can select from a list of canned messages to shout, or 2. You can have the ShoutBox generate a random message for you.
  • 4. You must use data structures Array, ArrayList, or a HashMap to store the message data. Canned messages: One data structure will store the canned messages. You can load this data structure with canned messages of your choosing. The shoutOutCannedMessage() method will loop through the data structure to first display all canned messages and allow the user to select one. The shoutOutCannedMessage() will return the selected message String. This String will be displayed in the virtual world. For now, your virtual world will be the output window. Random messages: To generate random messages, you need to have a data structure that holds a list of subjects, another data structure that holds a list of objects, another that holds a list of verbs, another that holds a list of adverbs, and another that holds a list of adjectives. The lists you create can hold as many words as you would like. The shoutOutRandomMessage() method will use a random number generator that selects one word from each data structure to form a random message. Random messages will be in the following form: Subject - Verb - Adjective - Object – Adverb. The generated message String will be returned. The String will be displayed by the ShoutBox in the virtual world. For now, your virtual world will be the output window. MyClone
  • 5. -firstName -lastName introduction() Partial class diagram for the ShoutBox object: Examples of canned messages stored in the canned messages data structure (you can store as many canned messages as you would like): Example of subjects stored in the subjects data structure: “I” “You” Example of objects stored in the objects data structure:
  • 6. “course” “homework” Example of verbs stored in the verbs data structure: “studying” “eating” “sneezing” Example of adjectives stored in the adjectives data structure: “funny” “prickly” “hard” “awesome” Example of adverbs stored in the adverbs data structure: ShoutBox String shoutOutRandomMessage() String shoutOutCannedMessage() “Hello World”
  • 7. “I am studying” “I am at work” “quickly” “everywhere” Specifications for Your Additional Object You will create another object of your choosing to add to your virtual world. Your object should have at a minimum two (2) instance variables and one (1) method. You will demonstrate your understanding of encapsulation by protecting your instance variables by making them private and by creating getters and setter methods for all instance variables. You should have at least one constructor created that initializes all instance variables. Specifications for Virtual World Application You will create a virtual world application that will test your MyClone, ShoutBox, and the object you decided to add to your virtual world. Because this is a simple prototype, you will not actually create any graphics to represent the objects in the virtual world. Any displayed information will simply be displayed in the output window.
  • 8. Submit your Java application by submitting all .java files and at least four screenshots that demonstrate you tested the application. While the listed number of instance variables and methods are the minimum number required for each class, you are free to create additional. Specifically, the following critical elements must be addressed: I. Program Functionality and Alignment a. Make sure your entire program functions correctly and that there are no exceptions or compile errors b. In writing your code, make sure that you are meeting or exceeding all of the given specifications for each class. Although you will be graded on coverage of stated requirements, you are free to use your creative touch in developing additional classes and objects with additional instance variables should you wish. He reads red book quickly! c. Create the unit test application and use it to test the functionality of each class. Submit the screenshots showing that the code was tested. II. Data Structure for Message Storage: Use data structures (either Arrays, ArrayLists, or a HashMaps) to store the message data in accordance with the
  • 9. given specifications. You can use one type, or a mix of the listed types of data structures for message storage. Specifically, it should be one data structure per word type (verb, subject, etc.), but you can choose to use a HashMap for canned messages and maybe ArrayLists for the use Arrays for all of them. III. Methods and Instance variables a. Method shoutOutCannedMessage() loops through the data structure that stores the canned messages first to display all canned messages and allows the user to select one canned message. b. The method shoutOutCannedMessage() will return the selected message string. c. Your shoutOutRandomMessage() method should use a random number generator that selects one word from each data structure to form a random message. The random number generated should not exceed the bounds of your data. In other words, if you only have 5 words in a data structure, the random number generated should not be an index that has no word stored. d. The method shoutOutRandomMessage() should return a randomly generated message string in accordance with specifications, in the form: Subject - Verb - Adjective - Object - Adverb (for example, “You read hard books quickly”). e. Use the MyClone introduction() method to introduce your clone to the virtual world by displaying a greeting, your full
  • 10. name, and anything else you would want to say. f. MyClone class should include instance variables (at least firstName and lastName) that are made private and have associated getters (accessors) and setters (mutators) for all instance variables. g. You should build an additional class of your choice, which should have at least 2 private instance variables with associated getters (accessors) and setters (mutators) and 1 method your choice. IV. Test Application: You will create one application that will test all three classes. a. Perform a unit test of the MyClone to test all getters (accessors) and setters (mutators)and method(s) of the class. b. Perform a unit test of the ShoutBox to test all methods of the class. c. Perform a unit test of the additional class object to test all getters (accessors) and setters (mutators) and method(s) of the class. V. In-Code Comments a. Make sure your object-oriented code is accurately documented to explain the purpose and behavior of the code. b. Articulation of comments is clear and concise for the audiences that may review it, including your instructor and individuals that may need to maintain or implement the code. Milestones Milestone One: MyClone Class In Module Two, you will submit your Java class, MyClone. You
  • 11. will create your initial version of the MyClone class. MyClone class should have instance variables firstName and lastName. The firstName and lastName instance variables hold a value for first and last names respectively. You will demonstrate your understanding of encapsulation using the private specifier to restrict access to your instance variables. This milestone is graded with the Milestone One Rubric. Feedback should be incorporated into the final project as warranted. Milestone Two: Message Array In Module Five, you will submit your Java code that creates an Array of String messages. Write an application that uses an Array to store 10 messages of type String. You will store this Array with 10 messages of your choosing. For example, a message could be “I love Java the programming language!” or another message could be “I love Java the drink!” You may initialize your Array with the messages or have the user enter the messages. The choice is yours. Your Java code will loop through the Array to iterate through your entire list and display each message and allow the user to select one. The shoutOutCannedMessage() will return the selected message String. This milestone is graded with the Milestone Two Rubric. Feedback should be incorporated into the final project as warranted. Milestone Three: Programmer-Defined Class In Module Seven, You will create a Virtual World application as your final project. This Virtual World will have several
  • 12. objects including a MyClone object and another object of your choice. It would be an excellent idea to review the Final Project Guidelines at this time. For this Third Final Project Milestone, you will finish development of your MyClone class and create another class of your choice. In Module Two, you started development of the MyClone class. You will continue to develop the MyClone class by adding accessor methods, mutator methods, and an introduction() method. You will create an accessor and mutator method for each instance variable declared in the MyClone class. The introduction() method will introduce yourself to the virtual world by displaying a greeting, your first and last name, and anything else you would want to say. You will also create another class of your choice. Your programmer-defined class should have at a minimum two instance variables and one method. The instance variables and method should be representative of the data and behavior that objects of this class will have. You will demonstrate your understanding of encapsulation by declaring the instance variables as private and by creating accessors and mutators for each instance variable. You should have at least one constructor created that initializes all instance variables. Document your code. This milestone is graded with the Milestone Three Rubric. Feedback should be incorporated into the final project as warranted. Milestone Four: ShoutBox Class With Methods In Module Eight, you will create the ShoutBox class for your Virtual World. Your ShoutBox class will have two methods: Method shoutOutCannedMessage()will return type String. The shoutOutCannedMessage will use an Array or an ArrayList to store 10 messages of type String. For those of you who are
  • 13. more advanced with your Java skills, you could use a HashMap for the data structure. You can load this data structure with 10 messages of your choosing. You can initialize your Array or ArrayList with the messages or have the user enter the messages. The choice is yours. The shoutOutCannedMessage() will loop through the data structure to first display all canned messages and allow the user to select one. The shoutOutCannedMessage() will return the selected message String. Document your shoutOutCannedMessage() method to explain the code. Method shoutOutRandomMessage() method will return type String. The shoutOutRandomMessage() will use several Arrays or an ArrayList to store words. You will have one data structure that holds a list of words that are subjects, another data structure that holds a list of words that are objects, another that holds a list of verbs, another that holds a list of adverbs, and another that holds a list of adjectives. You can initialize your data structures with words or have the user enter the words. The choice is yours. The shoutOutRandomMessage() method will use a random number generator that selects one word from each data structure to form a random message. The shoutOutRandomMessage() method will return the random message as a String data type. Random messages will be of the following form: Subject - Verb - Adjective - Object - Adverb.
  • 14. Document your shoutOutRandomMessage() method to explain the code. This milestone is graded with the Milestone Four Rubric. Feedback should be incorporated into the final project as warranted. Final Submission: Virtual World Java Application In Module Nine, you will submit all classes for the Virtual World Java application. It should be a complete artifact, free of compiler and run-time errors, and contain all of the critical elements of the final product. You will submit the following completed classes in addition to a class that tests them: MyClone, ShoutBox, the class you designed, and a test class. In your test class you will have a main() method. This test class will represent your virtual world application that will test the MyClone, the ShoutBox, and the class you decided to create in Module Seven. Document your code with comments. It should reflect the incorporation of feedback gained throughout the course. This submission will be graded using the Final Project Rubric. Deliverable Milestones Milestone Deliverables Module Due Grading 1 MyClone Class Two Graded separately; Milestone One Rubric 2 Message Array Five Graded separately; Milestone Two Rubric 3 Programmer-defined Class Seven Graded separately;
  • 15. Milestone Three Rubric 4 ShoutBox Class With Methods Eight Graded separately; Milestone Four Rubric Final Project: Virtual World Java Application Nine Graded separately; Final Project Rubric Final Project Rubric Requirements of Submission: Written components of projects must follow these formatting guidelines when applicable: double spacing, 12-point Times New Roman font, one-inch margins, and discipline-appropriate citations. This activity uses an integrated rubric in Blackboard. Students can view instructor feedback in the Grade Center. For more information, review these instructions. Instructor Feedback: Students can find their feedback in the Grade Center or Turnitin. Critical Elements Exemplary (100%) Proficient (90%) Needs Improvement (70%) Not Evident (0%) Value Program Functionality
  • 16. All functional and design requirements are met and the user interface is friendly, handles invalid user interactions, displays output in a clear format, and is intuitive Complete program functions correctly, with no compile errors and no exceptions Complete program does not function correctly Program is not complete 10 Program Alignment Meets “Proficient” criteria and code includes additional instance variables or objects that behave according to given specifications Complete code meets the specifications and minimum requirements for each class Code is complete, but does not meet all of the given specifications and minimum requirements for each class Code is not complete 7
  • 17. Unit Test Application Meets “Proficient” criteria and unit test application behaves like a true virtual world Unit test application accurately tests the functionality of each class Unit test application tests the functionality of each class, but not accurately Unit test application does not test the functionality of each class 7 Data Structure for Message Storage Meets “Proficient” criteria and generics are used to define the type of any ArrayList or HashMap; initialization of data structures are flexible (user enters the data instead of hard coded initialized data) Uses an Array, ArrayList, or a HashMap to effectively store massage data in accordance with the given specifications
  • 18. Uses an Array, ArrayList, or a HashMap to effectively store massage data, but not in accordance with the given specifications Does not use an Array, ArrayList, or a HashMap to effectively store massage data 6 http://snhu- media.snhu.edu/files/production_documentation/formatting/rubr ic_feedback_instructions_student.pdf shoutOutCannedMes sage() Method Meets “Proficient” criteria substantiated with formatted printing used to display all canned messages from the shoutOutCannedMessage() method; the user interface provided that allows user to select a message is robust, handles invalid entries, and prevents the user from entering
  • 19. an index that is beyond the range of the indices for the Array; loop uses length of Array to control loop Method loops through the data structure that stores the canned messages, displays all canned messages, and allows user to select one; method returns the correct selected message string Method insufficiently loops through the data structure that stores the canned messages, does not display all canned messages, or method insufficiently allows user to select one message Method does not loop through the data structure that stores the canned messages 6 shoutOutRandomMe ssage() Method Meets “Proficient” criteria and uses a different random number for the index for each
  • 20. data structure Method correctly uses a random number generator that selects one word from each data structure to form a random message Method incorrectly uses a random number generator so that it does not select one word from each data structure to form a random message Method does not use a random number generator 6 shoutOutRandomMe ssage() Return Meets “Proficient” criteria substantiated with the correct format used to return the message string Method returns a randomly generated message in accordance with the given specifications and in the proper string format
  • 21. Method returns a randomly generated message, but not in accordance with specifications or not in the proper string format Method does not return a randomly generated message 6 MyClone Method introduction() Meets “Proficient” criteria substantiated with formatted printing used to display the introduction; message displayed is aesthetically pleasing; introduction() method uses getters or accessor methods to get the current value of the first name and last name instance variables Method correctly displays a greeting, the full name of the clone, and an introduction statement for the virtual world Method displays a greeting, the full name of the clone, and an introduction statement for the virtual world, but not correctly
  • 22. Method does not display a greeting, the full name of the clone, and an introduction statement for the virtual world 6 MyClone Class Instance variables Meets “Proficient” criteria and the class includes additional, creative or real-world private instance variables that follow specifications MyClone class includes required instance variables that are made private and have associated getters and setters MyClone class includes required instance variables that are made private but do not have associated getters and setters MyClone class does not include the required instance variables and the instance variables are not made private
  • 23. 7 Additional Class Meets “Proficient” criteria and the class objects are creative or unique with private instance variables that fit the object The choice class has 2 private instance variables with associated getters and setters and 1 successful method The choice class has 2 private instance variables with associated getters and setters and 1 method, but the method is not successful or the instance variables do not follow specifications The choice class does not have 2 private instance variables and 1 method 7 Unit Test: MyClone Meets “Proficient” criteria substantiated with a user interface that lets the user interact with the application;
  • 24. unit test application creates more than one MyClone object and tests all possible code paths Unit test successfully tests all getters and setters and method(s) of the class Unit test tests all getters and setters and method(s) of the class, but not successfully Unit test does not test all getters and setters and method(s) of the class 6 Unit Test: ShoutBox Meets “Proficient” criteria substantiated with a user interface that allows the user to interact with the application; unit test application tests all possible code paths Unit test successfully tests all methods of the class Unit test tests all methods of the class, but not successfully
  • 25. Unit test does not test all methods of the class 6 Unit Test: Additional Class Meets “Proficient” criteria substantiated with user interface that allows the user to interact with the application; unit test application creates more than one of these objects and tests all methods more than once; unit test application tests all possible code paths Unit test successfully tests all getters and setters and method(s) of the class Unit test tests all getters and setters and method(s) of the class, but not successfully Unit test does not test all getters and setters and method(s) of the class 6
  • 26. Code Documentation Meets “Proficient” criteria and all methods have a header that explains the purpose of the method, the pre-conditions, and the post-conditions Code is accurately documented to explain the purpose and behavior of the code Code is documented to explain the purpose and behavior of the code, but not always accurately Code is not documented to explain the purpose and behavior of the code 6 Articulation of Comments Meets “Proficient” criteria and submission is properly cited, free of errors related to citations, grammar, spelling, syntax, and organization and is presented in a professional and
  • 27. easy to read format Articulation of comments is clear and concise, using appropriate jargon for all users and viewers, with no major errors related to citations, grammar, spelling, syntax, or organization Articulation of comments is clear and concise , but does not use appropriate jargon for all users and viewers or has major errors related to citations, grammar, spelling, syntax, or organization that negatively impact readability and articulation of main ideas Articulation of comments is not clear and concise 8 Earned Total 100%
  • 28. virtual_world final Virtual World/.classpath Virtual World/.project Virtual World org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature Virtual World/.settings/org.eclipse.jdt.core.prefs eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enable d org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8
  • 29. org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.8 Virtual World/bin/VirtualWorldPack/Main.classpackage VirtualWorldPack; publicsynchronizedclass Main { public void Main(); publicstatic void main(String[]); } Virtual World/bin/VirtualWorldPack/MyClone.classpackage VirtualWorldPack; publicsynchronizedclass MyClone { private String firstName; private String lastName; public void MyClone(); public void MyClone(String, String); public void introduction(); public void setFirstName(String); public void setLastName(String); public String getFirstName(); public String getLastName(); }
  • 30. Virtual World/bin/VirtualWorldPack/MyComputer.classpackage VirtualWorldPack; publicsynchronizedclass MyComputer { private String Mark; private String OpSystem; public void MyComputer(); public void MyComputer(String, String); public void introduce(); public void setMark(String); public void setOpSystem(String); public String getMark(); public String getOpSystem(); } Virtual World/bin/VirtualWorldPack/ShoutBox.classpackage VirtualWorldPack; publicsynchronizedclass ShoutBox { java.util.ArrayList list; public void ShoutBox(); public void shoutOutCannedMessage(); public void shoutOutRandomMessage(); } Virtual World/src/VirtualWorldPack/Main.javaVirtual World/src/VirtualWorldPack/Main.javapackageVirtualWorldPac k; publicclassMain{ publicstaticvoid main(String[] argv){ //Creat a new object from MyClone class
  • 31. MyClone human =newMyClone(); //Creat a new object from MyComputer class MyComputer laptop =newMyComputer(); //Creat a new object from ShoutBox class ShoutBox genmess =newShoutBox(); //call the setter method to store the first name human.setFirstName("Jack"); //call the setter method to store the last name human.setLastName("Decaprio"); //call the method introduction() to display the name and greetin g human.introduction(); //call the setter method to store the mark laptop.setMark("Lenovo"); //call the setter method to store the operating system laptop.setOpSystem("Windows 8"); //call the introduce method to print the mark and system laptop.introduce(); //calling the method to display the canned message genmess.shoutOutCannedMessage(); //calling the method to display the random message genmess.shoutOutRandomMessage(); }
  • 32. } Virtual World/src/VirtualWorldPack/MyClone.javaVirtual World/src/VirtualWorldPack/MyClone.javapackageVirtualWorl dPack; publicclassMyClone{ privateString firstName ; privateString lastName ; /*The first constractor * to initialize * the first name * and the last name with null */ publicMyClone(){ this.firstName =null; this.lastName =null; } /*The second constractor * with two parameter to * initialize the firt * name and the last name */ publicMyClone(String firstname,String lastname){ this.firstName = firstname; this.lastName = lastname; } /* method will introduce
  • 33. * you to the virtual world * by displaying a greeting, * your full name, and anything else you would want to say. * */ publicvoid introduction(){ System.out.println("***************************Welcome T o My Virtual World Java Application********************** ****"); System.out.println("My first name : "+getFirstName()); System.out.println("My last name : "+getLastName()); } //method to set the first name of the object publicvoid setFirstName(String firstname){ this.firstName = firstname; } //method to set the last name of the object publicvoid setLastName(String lastname){ this.lastName = lastname ; } //method to get the first nameof the object publicString getFirstName(){ returnthis.firstName; } //method to get the last name of the object publicString getLastName(){ returnthis.lastName; }
  • 34. } Virtual World/src/VirtualWorldPack/MyComputer.javaVirtual World/src/VirtualWorldPack/MyComputer.javapackageVirtualW orldPack; publicclassMyComputer{ privateStringMark; privateStringOpSystem; /*The first constractor to * initialize the two * string variable with * null*/ publicMyComputer(){ this.Mark=null; this.OpSystem=null; } /*The second constractor with * two prametre * to store the information * on the two private * variable * */ publicMyComputer(String mark,String system){ this.Mark= mark; this.OpSystem= system;
  • 35. } /*The introduce() method * to print the mark and * the oprating system * of my laptop * */ publicvoid introduce(){ System.out.println("My computer mark : "+ getMark()); System.out.println("My computer operating system : "+ getOpS ystem()); } //setter method to store the mark on the variable publicvoid setMark(String mark){ this.Mark= mark; } //setter method to store the operating system on the variable publicvoid setOpSystem(String system){ this.OpSystem= system; } //getter method to output the mark on the window publicString getMark(){ returnthis.Mark; } //getter method to output the operating system on the window publicString getOpSystem(){ returnthis.OpSystem; } }
  • 36. Virtual World/src/VirtualWorldPack/ShoutBox.javaVirtual World/src/VirtualWorldPack/ShoutBox.javapackageVirtualWorl dPack; import java.util.ArrayList; import java.util.Scanner; import java.util.Random; publicclassShoutBox{ ArrayList<String> list =newArrayList<>(); /*this method display all * canned messages and * allow the user * to select one */ publicvoid shoutOutCannedMessage(){ System.out.println(" "); System.out.println("***************List of canned message** *************"); list.add(0,"1-Hello World."); list.add(1,"2-I am studying."); list.add(2,"3-I am at work."); list.add(3,"4-I am fine."); list.add(4,"5-I love java."); list.add(5,"6-I am on my bed."); list.add(6,"7-I am eating."); list.add(7,"8-I use my laptop."); list.add(8,"9-I am in the kitchen."); list.add(9,"10-I am reading."); int size = list.size(); for(int i=0;i<size;i++) { System.out.println(list.get(i));
  • 37. System.out.println("---------------------------"); } int selectedMess; Scanner scanner =newScanner(System.in); System.out.print("==> Please select one canned message by ent er the index number : "); System.out.print(" "); selectedMess = scanner.nextInt(); System.out.println(list.get(selectedMess-1)); } /*The shoutOutRandomMessage() method will * use a random number generator that selects * one word from each data structure to form a random message. Random messages will be in the following form: Subject - Verb - Adjective - Object – Adverb */ publicvoid shoutOutRandomMessage(){ String[] subject={" He's"," I'm"," She"}; String[] verb={" eating"," catching"," studying"," caughing"}; String[] adjective={" funny"," hard"," good"," polite"}; String[] object={" course"," homework"," books"," dog"}; String[] adverb={" quickly. "," everywhere. "," accordingly. "," awfully. "}; Random r =newRandom();//intialize a Random int selectedElement = r.nextInt(subject.length); for(int i=1; i<=1; i++)