SlideShare a Scribd company logo
1 of 2
Write
a Java program (non-GUI i.e only Java class) to demonstrate
the Singleton pattern.
The key parts of the singleton pattern are:
A private static variable to store the single instance called the
singleton
A public static method for callers to get a reference to the
instance
A private constructor so no callers can instantiate the object
directly
Using
these key parts, write a Java program that will allow a user of
the program to assign only one runner to each of the 8 lanes of
running track in a field.
Include
a brief documentation (using java comments in the code) and
screen shot of output of the program..
All Individual (programming) assignments require students to
submit
code zipped
, code with java
comments
, screen shot of
build output
and screen shot of non-GUI
output
in Net Beans environment
Note
:
All code must we written to generate output in non-GUI
application (Java->Java Application). Do not use forms in your
Java Application for PRG/421 course. Use only Java class in
your project.

More Related Content

Similar to Write a Java program (non-GUI i.e only Java class) to demonstrate .docx

Running Code in the Android Stack at ELCE 2013
Running Code in the Android Stack at ELCE 2013Running Code in the Android Stack at ELCE 2013
Running Code in the Android Stack at ELCE 2013
Opersys inc.
 
Slot04 creating gui
Slot04 creating guiSlot04 creating gui
Slot04 creating gui
Viên Mai
 
Applications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdfApplications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdf
akshay1213
 

Similar to Write a Java program (non-GUI i.e only Java class) to demonstrate .docx (20)

Visage fx
Visage fxVisage fx
Visage fx
 
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting StartedCore Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and Firebase
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Demo on JavaFX
Demo on JavaFXDemo on JavaFX
Demo on JavaFX
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Java introduction
Java introductionJava introduction
Java introduction
 
JavaAdvUnit-1.pptx
JavaAdvUnit-1.pptxJavaAdvUnit-1.pptx
JavaAdvUnit-1.pptx
 
Running Code in the Android Stack at ELCE 2013
Running Code in the Android Stack at ELCE 2013Running Code in the Android Stack at ELCE 2013
Running Code in the Android Stack at ELCE 2013
 
Report swings
Report swingsReport swings
Report swings
 
Curso de Programación Java Básico
Curso de Programación Java BásicoCurso de Programación Java Básico
Curso de Programación Java Básico
 
Slot04 creating gui
Slot04 creating guiSlot04 creating gui
Slot04 creating gui
 
Java swing 1
Java swing 1Java swing 1
Java swing 1
 
Applets in Java
Applets in JavaApplets in Java
Applets in Java
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Innovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesInnovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best Practices
 
Getting started with react basics
Getting started with react basicsGetting started with react basics
Getting started with react basics
 
Applications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdfApplications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdf
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
 
AdvancedJava.pptx
AdvancedJava.pptxAdvancedJava.pptx
AdvancedJava.pptx
 

More from ShainaBoling829

You are an intelligence analyst for the Federal Bureau of Investigat.docx
You are an intelligence analyst for the Federal Bureau of Investigat.docxYou are an intelligence analyst for the Federal Bureau of Investigat.docx
You are an intelligence analyst for the Federal Bureau of Investigat.docx
ShainaBoling829
 
You are a Wichita Police Department detective working in the major c.docx
You are a Wichita Police Department detective working in the major c.docxYou are a Wichita Police Department detective working in the major c.docx
You are a Wichita Police Department detective working in the major c.docx
ShainaBoling829
 
Yet society has in every possible way created the impression that on.docx
Yet society has in every possible way created the impression that on.docxYet society has in every possible way created the impression that on.docx
Yet society has in every possible way created the impression that on.docx
ShainaBoling829
 
WWTC Active Directory DesignWWTC office at New York is largely a.docx
WWTC Active Directory DesignWWTC office at New York is largely a.docxWWTC Active Directory DesignWWTC office at New York is largely a.docx
WWTC Active Directory DesignWWTC office at New York is largely a.docx
ShainaBoling829
 
Written Report on Documentary Enron The Smartest Guys in the Roo.docx
Written Report on Documentary Enron The Smartest Guys in the Roo.docxWritten Report on Documentary Enron The Smartest Guys in the Roo.docx
Written Report on Documentary Enron The Smartest Guys in the Roo.docx
ShainaBoling829
 
Written assignment,. please follow instruction..Legislative Prof.docx
Written assignment,. please follow instruction..Legislative Prof.docxWritten assignment,. please follow instruction..Legislative Prof.docx
Written assignment,. please follow instruction..Legislative Prof.docx
ShainaBoling829
 

More from ShainaBoling829 (20)

You are assisting Dr. Jones with a procedure that has been classifie.docx
You are assisting Dr. Jones with a procedure that has been classifie.docxYou are assisting Dr. Jones with a procedure that has been classifie.docx
You are assisting Dr. Jones with a procedure that has been classifie.docx
 
You are an intelligence analyst for the Federal Bureau of Investigat.docx
You are an intelligence analyst for the Federal Bureau of Investigat.docxYou are an intelligence analyst for the Federal Bureau of Investigat.docx
You are an intelligence analyst for the Federal Bureau of Investigat.docx
 
You are a Wichita Police Department detective working in the major c.docx
You are a Wichita Police Department detective working in the major c.docxYou are a Wichita Police Department detective working in the major c.docx
You are a Wichita Police Department detective working in the major c.docx
 
You are a primary care physician in a large group practice that uses.docx
You are a primary care physician in a large group practice that uses.docxYou are a primary care physician in a large group practice that uses.docx
You are a primary care physician in a large group practice that uses.docx
 
You are a police officer assigned to a task force that is investigat.docx
You are a police officer assigned to a task force that is investigat.docxYou are a police officer assigned to a task force that is investigat.docx
You are a police officer assigned to a task force that is investigat.docx
 
You are a patient at seeing a Plastic Surgeon for a consultation. Du.docx
You are a patient at seeing a Plastic Surgeon for a consultation. Du.docxYou are a patient at seeing a Plastic Surgeon for a consultation. Du.docx
You are a patient at seeing a Plastic Surgeon for a consultation. Du.docx
 
You are a new PR intern at Apple. Apple is donating 200 iPads to a l.docx
You are a new PR intern at Apple. Apple is donating 200 iPads to a l.docxYou are a new PR intern at Apple. Apple is donating 200 iPads to a l.docx
You are a new PR intern at Apple. Apple is donating 200 iPads to a l.docx
 
You are a leader of a European country. You want your country to get.docx
You are a leader of a European country. You want your country to get.docxYou are a leader of a European country. You want your country to get.docx
You are a leader of a European country. You want your country to get.docx
 
You are a community health educator and you have been tasked with de.docx
You are a community health educator and you have been tasked with de.docxYou are a community health educator and you have been tasked with de.docx
You are a community health educator and you have been tasked with de.docx
 
You and your team have completed your fieldwork and have a handful o.docx
You and your team have completed your fieldwork and have a handful o.docxYou and your team have completed your fieldwork and have a handful o.docx
You and your team have completed your fieldwork and have a handful o.docx
 
xxxx, great post. I agree that as technology has grown so has the .docx
xxxx, great post. I agree that as technology has grown so has the .docxxxxx, great post. I agree that as technology has grown so has the .docx
xxxx, great post. I agree that as technology has grown so has the .docx
 
Yes Richard I agree with you. The American Red Cross has been workin.docx
Yes Richard I agree with you. The American Red Cross has been workin.docxYes Richard I agree with you. The American Red Cross has been workin.docx
Yes Richard I agree with you. The American Red Cross has been workin.docx
 
Yet society has in every possible way created the impression that on.docx
Yet society has in every possible way created the impression that on.docxYet society has in every possible way created the impression that on.docx
Yet society has in every possible way created the impression that on.docx
 
xxxxx comment 1xxxxx, I believe America only sees leftright, li.docx
xxxxx comment 1xxxxx, I believe America only sees leftright, li.docxxxxxx comment 1xxxxx, I believe America only sees leftright, li.docx
xxxxx comment 1xxxxx, I believe America only sees leftright, li.docx
 
WWTC Active Directory DesignWWTC office at New York is largely a.docx
WWTC Active Directory DesignWWTC office at New York is largely a.docxWWTC Active Directory DesignWWTC office at New York is largely a.docx
WWTC Active Directory DesignWWTC office at New York is largely a.docx
 
Wrongful Convictions and the Utilization of Eyewitness Accounts Wr.docx
Wrongful Convictions and the Utilization of Eyewitness Accounts Wr.docxWrongful Convictions and the Utilization of Eyewitness Accounts Wr.docx
Wrongful Convictions and the Utilization of Eyewitness Accounts Wr.docx
 
Written Report on Documentary Enron The Smartest Guys in the Roo.docx
Written Report on Documentary Enron The Smartest Guys in the Roo.docxWritten Report on Documentary Enron The Smartest Guys in the Roo.docx
Written Report on Documentary Enron The Smartest Guys in the Roo.docx
 
Written assignment,. please follow instruction..Legislative Prof.docx
Written assignment,. please follow instruction..Legislative Prof.docxWritten assignment,. please follow instruction..Legislative Prof.docx
Written assignment,. please follow instruction..Legislative Prof.docx
 
Written Assignment Choose a Part 121 air carrier(such as Am.docx
Written Assignment Choose a Part 121 air carrier(such as Am.docxWritten Assignment Choose a Part 121 air carrier(such as Am.docx
Written Assignment Choose a Part 121 air carrier(such as Am.docx
 
WRITTEN ASSIGNMENT for Unit 11 is to write a eulogy, no longer than .docx
WRITTEN ASSIGNMENT for Unit 11 is to write a eulogy, no longer than .docxWRITTEN ASSIGNMENT for Unit 11 is to write a eulogy, no longer than .docx
WRITTEN ASSIGNMENT for Unit 11 is to write a eulogy, no longer than .docx
 

Recently uploaded

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
Krashi Coaching
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptx
 
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading RoomImplanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
Implanted Devices - VP Shunts: EMGuidewire's Radiology Reading Room
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Benefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptxBenefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptx
 

Write a Java program (non-GUI i.e only Java class) to demonstrate .docx

  • 1. Write a Java program (non-GUI i.e only Java class) to demonstrate the Singleton pattern. The key parts of the singleton pattern are: A private static variable to store the single instance called the singleton A public static method for callers to get a reference to the instance A private constructor so no callers can instantiate the object directly Using these key parts, write a Java program that will allow a user of the program to assign only one runner to each of the 8 lanes of running track in a field. Include a brief documentation (using java comments in the code) and screen shot of output of the program.. All Individual (programming) assignments require students to submit code zipped , code with java comments , screen shot of build output and screen shot of non-GUI output in Net Beans environment Note : All code must we written to generate output in non-GUI application (Java->Java Application). Do not use forms in your
  • 2. Java Application for PRG/421 course. Use only Java class in your project.