SlideShare a Scribd company logo
1 of 5
HELPIDO.COM
CLICK HERE TO GET THE SOLUTION !!!!!!!!!
CIS/355 iLab 4 of 6
iLab 4 of 6: Inheritance and Simple GUI
i L A B O V E R V I E W
Scenario and Summary
In this lab you will create one project that uses inheritance and two simple Graphical User Interface (GUI)
programs.
Deliverables
Program files for each of the following three programs
1. InheritanceTest
2. DayGui
3. OfficeAreaCalculator
At the beginning of ALL your programs, put a comment box that includes the program name, your
name, and a brief description of the program.
Example:
/***********************************************************************
Program Name: ProgramName.java
Programmer's Name: Student Name
Program Description: Describe here what this program will do
***********************************************************************/
How to submit your assignment:
1. The programs MUST have the same names as the assignment title.
2. Each Java source file (*.java) must include a corresponding class file (*.class) program as evidence
of success.
3. In addition to the program source code files and byte code files, put all your program source code
files and screen shots of your program output files into a Word document.
4. You must use a zipped folder to send your weekly assignment to the Dropbox. Do not send
subfolders within your zipped folder. Place ALL of the .java and .class files for the week into the one
zipped folder. The zip folder should be named: CIS355A_YourLastName_iLab_Week4, and this zip folder
will contain all the weekly programming assignments.
i L A B S T E P S
STEP 1: InheritanceTest (20 points)
Write a program called InheritanceTest.java to support an inheritance hierarchy for class Point-
Square-Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods
for each class. The private variable of Point should be the x-y coordinates. The private data of Square
should be the sideLength. The private data of Cube should be depth. Each class must provide applicable
accessor, mutator, and toString() methods for manipulating private variables of each corresponding class.
In addition, the Square class must provide the area() and perimeter() methods. The Cube must provide
the area() and volume() methods.
Write a program that instantiates objects of your classes, ask the user to enter the value for x, y, and
sideLength, test all instance methods and outputs of each object’s perimeter, area, and volume when
appropriate.
Grading Rubric
InheritanceTest Points Description
Standard header included 1 Must contain program's name, student name, and description of
the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
Point class created 3 Class contains accessor, mutator, and toString methods
Square class created 3 Class contains accessor, mutator, toString, perimeter, and area
methods
Cube class created 3 Class contains accessor, mutator, toString, area, and volume
methods
InheritanceTest class
created
4 Test class asks user for input of x, y, and sideLength and tests all
instance methods
Correct output is
displayed
4 Test class produces correct output showing all values
corresponding to each object
Subtotal 20
STEP 2: DayGui (10 points)
Write a program called DayGui.java that creates a GUI having the following properties
Object Property Setting
JFrame
Name
Caption
Layout
mainFrame
Messages
FlowLayout
JButton
Name
Caption
Mnemonic
cmdGood
Good
G
JButton
Name
Caption
Mnemonic
cmdBad
Bad
B
Add individual event handlers to your program so that when a user clicks the Good button, the message
"Today is a good day!" appears in a dialog box, and when the Bad button is clicked, the message "I'm
having a bad day today!" is displayed. The following tutorial shows you much of the code solution. Feel
free to use the tutorial, but make changes so that you are not simply copying the tutorial code for your
entire solution. To make this different from the tutorial, change the colors of the buttons and panel. Also,
add this application to a tabbed pane along with the program you will complete in the next step, Step 3.
The following tutorials will likely be useful as you work to complete this step:
JTabbedPane
Tutorial to Write Your First GUI
Grading Rubric
DayGui Points Description
Standard header included 1 Must contain program’s name, student name, and
description of the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
DayGui class created 1 Class DayGui was created which contains the
required properties
cmdGoodJButton created along with
the event handler
1.5 The Good button shows on the application and when
pressed the appropriate message displays on a
separate window
cmdBadJButton created along with
the event handler
1.5 The Bad button shows on the application and when
pressed the appropriate message displays on a
separate window
Application contains required
changes and displays the correct
3 Application appears as one of the tabs in a tabbed
application and buttons and panel are in different
output colors
Subtotal 10
STEP 3: OfficeAreaCalculator (10 points)
Write a program called OfficeAreaCalculator.java that displays the following prompts using two label
components
Enter the length of the office:
Enter the width of the office:
Have your program accept the user input in two text fields. When a button is clicked, your program
should calculate the area of the office and display the area in a text field with a label of Area. This display
should be cleared whenever the input text fields receive the focus. A second button should be provided to
terminate the application (Exit button).
The following tutorial shows you much of the code solution. Feel free to use the tutorial, but make
changes so that you are not simply copying the tutorial code for your entire solution. To make this
different from the tutorial, change the colors of the panel. Also, add this application to the same tabbed
pane (see the JTabbedPane tutorial) as the application you built in Step 2, the DayGui application.
Office Area Calculator Tutorial
Grading Rubric
OfficeAreaCalculator Points Description
Standard header included 1 Must contain program’s name, student name, and
description of the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
Created Length label and Length
input textbox field
1 The Length label and input textbox show on the
application and users can enter valid numeric value in
the textbox
Created Width label and Width input
textbox field
1 The Width label and input textbox show on the
application and users can enter valid numeric value in
the textbox
Created Area label and Area input
textbox field
1 The Area label and input textbox show on the
application and the area value displays in the textbox
when the Calculate button is pressed
Created Calculate button with the
appropriate handler
1 The Calculate button calculates the area given the
length and width of the office
Created Exit button with the
appropriate handler
1 The Exit button exits the application and terminates
the program
Application contains required
changes and displays the correct
output
2 Application appears as one of the tabs in a tabbed
application and panel is in a different color
Subtotal 10
CLICK HERE TO GET THE SOLUTION !!!!!!!!!

More Related Content

Viewers also liked

Tema 11 nieves y sara
Tema 11 nieves y saraTema 11 nieves y sara
Tema 11 nieves y saranivesita
 
Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6helpido9
 
The Top Productivity Tips to Run Your Business
The Top Productivity Tips to Run Your BusinessThe Top Productivity Tips to Run Your Business
The Top Productivity Tips to Run Your BusinessGusto
 
Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7helpido9
 
Cis 336 i lab 2 of 7
Cis 336 i lab 2 of 7Cis 336 i lab 2 of 7
Cis 336 i lab 2 of 7helpido9
 
Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6helpido9
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7helpido9
 
Cis 339 ilab 1 of 7
Cis 339 ilab 1 of 7Cis 339 ilab 1 of 7
Cis 339 ilab 1 of 7helpido9
 
Vivimos en sociedad
Vivimos en sociedadVivimos en sociedad
Vivimos en sociedadnivesita
 
Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6helpido9
 
Career Placement & Retention - It's Everyone's Job
Career Placement & Retention - It's Everyone's JobCareer Placement & Retention - It's Everyone's Job
Career Placement & Retention - It's Everyone's Jobcareerteam
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6helpido9
 
Examen oral
Examen oralExamen oral
Examen oralfernando
 
Webinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based Sharding
Webinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based ShardingWebinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based Sharding
Webinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based ShardingMongoDB
 
14 10 06 informe financeiro
14 10 06  informe financeiro14 10 06  informe financeiro
14 10 06 informe financeiroMB Associados
 

Viewers also liked (20)

Tema 11 nieves y sara
Tema 11 nieves y saraTema 11 nieves y sara
Tema 11 nieves y sara
 
Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6
 
The Top Productivity Tips to Run Your Business
The Top Productivity Tips to Run Your BusinessThe Top Productivity Tips to Run Your Business
The Top Productivity Tips to Run Your Business
 
Kosovski boj
Kosovski bojKosovski boj
Kosovski boj
 
Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7
 
Analisis
AnalisisAnalisis
Analisis
 
Cis 336 i lab 2 of 7
Cis 336 i lab 2 of 7Cis 336 i lab 2 of 7
Cis 336 i lab 2 of 7
 
Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
جاوي
جاويجاوي
جاوي
 
Cis 339 ilab 1 of 7
Cis 339 ilab 1 of 7Cis 339 ilab 1 of 7
Cis 339 ilab 1 of 7
 
Seminario 6
Seminario 6Seminario 6
Seminario 6
 
Vivimos en sociedad
Vivimos en sociedadVivimos en sociedad
Vivimos en sociedad
 
Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6
 
6 6
6 66 6
6 6
 
Career Placement & Retention - It's Everyone's Job
Career Placement & Retention - It's Everyone's JobCareer Placement & Retention - It's Everyone's Job
Career Placement & Retention - It's Everyone's Job
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6
 
Examen oral
Examen oralExamen oral
Examen oral
 
Webinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based Sharding
Webinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based ShardingWebinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based Sharding
Webinar: MongoDB 2.4 Feature Demo and Q&A on Hash-based Sharding
 
14 10 06 informe financeiro
14 10 06  informe financeiro14 10 06  informe financeiro
14 10 06 informe financeiro
 

Similar to Cis 355 i lab 4 of 6

Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6ashhadiqbal
 
CIS/355 ilab 4 of 6
CIS/355 ilab 4 of 6CIS/355 ilab 4 of 6
CIS/355 ilab 4 of 6helpido6
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6helpido6
 
Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6ashhadiqbal
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxAnasYunusa
 
Book management system
Book management systemBook management system
Book management systemSHARDA SHARAN
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17manjurkts
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire coursegrades4u
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lecturesmarwaeng
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 manjurkts
 
Software development slides
Software development slidesSoftware development slides
Software development slidesiarthur
 
ICT104 Programming Assignment Compiled By Divya Lee.docx
ICT104 Programming Assignment  Compiled By Divya Lee.docxICT104 Programming Assignment  Compiled By Divya Lee.docx
ICT104 Programming Assignment Compiled By Divya Lee.docxtarifarmarie
 
Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7solutionjug4
 
Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7comp274
 
Project 2 the second project involves/tutorialoutlet
Project 2 the second project involves/tutorialoutletProject 2 the second project involves/tutorialoutlet
Project 2 the second project involves/tutorialoutletMessanz
 

Similar to Cis 355 i lab 4 of 6 (20)

Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
 
CIS/355 ilab 4 of 6
CIS/355 ilab 4 of 6CIS/355 ilab 4 of 6
CIS/355 ilab 4 of 6
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6
 
Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6Cis 355 ilab 1 of 6
Cis 355 ilab 1 of 6
 
Vb introduction.
Vb introduction.Vb introduction.
Vb introduction.
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
 
Book management system
Book management systemBook management system
Book management system
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
SPF WinForm Programs
SPF WinForm ProgramsSPF WinForm Programs
SPF WinForm Programs
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
 
Software development slides
Software development slidesSoftware development slides
Software development slides
 
ICT104 Programming Assignment Compiled By Divya Lee.docx
ICT104 Programming Assignment  Compiled By Divya Lee.docxICT104 Programming Assignment  Compiled By Divya Lee.docx
ICT104 Programming Assignment Compiled By Divya Lee.docx
 
Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7
 
Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7
 
Project 2 the second project involves/tutorialoutlet
Project 2 the second project involves/tutorialoutletProject 2 the second project involves/tutorialoutlet
Project 2 the second project involves/tutorialoutlet
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Cis 355 i lab 4 of 6

  • 1. HELPIDO.COM CLICK HERE TO GET THE SOLUTION !!!!!!!!! CIS/355 iLab 4 of 6 iLab 4 of 6: Inheritance and Simple GUI i L A B O V E R V I E W Scenario and Summary In this lab you will create one project that uses inheritance and two simple Graphical User Interface (GUI) programs. Deliverables Program files for each of the following three programs 1. InheritanceTest 2. DayGui 3. OfficeAreaCalculator At the beginning of ALL your programs, put a comment box that includes the program name, your name, and a brief description of the program. Example: /*********************************************************************** Program Name: ProgramName.java Programmer's Name: Student Name Program Description: Describe here what this program will do ***********************************************************************/ How to submit your assignment: 1. The programs MUST have the same names as the assignment title. 2. Each Java source file (*.java) must include a corresponding class file (*.class) program as evidence of success. 3. In addition to the program source code files and byte code files, put all your program source code files and screen shots of your program output files into a Word document.
  • 2. 4. You must use a zipped folder to send your weekly assignment to the Dropbox. Do not send subfolders within your zipped folder. Place ALL of the .java and .class files for the week into the one zipped folder. The zip folder should be named: CIS355A_YourLastName_iLab_Week4, and this zip folder will contain all the weekly programming assignments. i L A B S T E P S STEP 1: InheritanceTest (20 points) Write a program called InheritanceTest.java to support an inheritance hierarchy for class Point- Square-Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods for each class. The private variable of Point should be the x-y coordinates. The private data of Square should be the sideLength. The private data of Cube should be depth. Each class must provide applicable accessor, mutator, and toString() methods for manipulating private variables of each corresponding class. In addition, the Square class must provide the area() and perimeter() methods. The Cube must provide the area() and volume() methods. Write a program that instantiates objects of your classes, ask the user to enter the value for x, y, and sideLength, test all instance methods and outputs of each object’s perimeter, area, and volume when appropriate. Grading Rubric InheritanceTest Points Description Standard header included 1 Must contain program's name, student name, and description of the program Program compiles 1 Program does not have any error Program executes 1 Program runs without any error Point class created 3 Class contains accessor, mutator, and toString methods Square class created 3 Class contains accessor, mutator, toString, perimeter, and area methods Cube class created 3 Class contains accessor, mutator, toString, area, and volume methods InheritanceTest class created 4 Test class asks user for input of x, y, and sideLength and tests all instance methods Correct output is displayed 4 Test class produces correct output showing all values corresponding to each object Subtotal 20
  • 3. STEP 2: DayGui (10 points) Write a program called DayGui.java that creates a GUI having the following properties Object Property Setting JFrame Name Caption Layout mainFrame Messages FlowLayout JButton Name Caption Mnemonic cmdGood Good G JButton Name Caption Mnemonic cmdBad Bad B Add individual event handlers to your program so that when a user clicks the Good button, the message "Today is a good day!" appears in a dialog box, and when the Bad button is clicked, the message "I'm having a bad day today!" is displayed. The following tutorial shows you much of the code solution. Feel free to use the tutorial, but make changes so that you are not simply copying the tutorial code for your entire solution. To make this different from the tutorial, change the colors of the buttons and panel. Also, add this application to a tabbed pane along with the program you will complete in the next step, Step 3. The following tutorials will likely be useful as you work to complete this step: JTabbedPane Tutorial to Write Your First GUI Grading Rubric DayGui Points Description Standard header included 1 Must contain program’s name, student name, and description of the program Program compiles 1 Program does not have any error Program executes 1 Program runs without any error DayGui class created 1 Class DayGui was created which contains the required properties cmdGoodJButton created along with the event handler 1.5 The Good button shows on the application and when pressed the appropriate message displays on a separate window cmdBadJButton created along with the event handler 1.5 The Bad button shows on the application and when pressed the appropriate message displays on a separate window Application contains required changes and displays the correct 3 Application appears as one of the tabs in a tabbed application and buttons and panel are in different
  • 4. output colors Subtotal 10 STEP 3: OfficeAreaCalculator (10 points) Write a program called OfficeAreaCalculator.java that displays the following prompts using two label components Enter the length of the office: Enter the width of the office: Have your program accept the user input in two text fields. When a button is clicked, your program should calculate the area of the office and display the area in a text field with a label of Area. This display should be cleared whenever the input text fields receive the focus. A second button should be provided to terminate the application (Exit button). The following tutorial shows you much of the code solution. Feel free to use the tutorial, but make changes so that you are not simply copying the tutorial code for your entire solution. To make this different from the tutorial, change the colors of the panel. Also, add this application to the same tabbed pane (see the JTabbedPane tutorial) as the application you built in Step 2, the DayGui application. Office Area Calculator Tutorial Grading Rubric OfficeAreaCalculator Points Description Standard header included 1 Must contain program’s name, student name, and description of the program Program compiles 1 Program does not have any error Program executes 1 Program runs without any error Created Length label and Length input textbox field 1 The Length label and input textbox show on the application and users can enter valid numeric value in the textbox Created Width label and Width input textbox field 1 The Width label and input textbox show on the application and users can enter valid numeric value in the textbox Created Area label and Area input textbox field 1 The Area label and input textbox show on the application and the area value displays in the textbox when the Calculate button is pressed Created Calculate button with the appropriate handler 1 The Calculate button calculates the area given the length and width of the office
  • 5. Created Exit button with the appropriate handler 1 The Exit button exits the application and terminates the program Application contains required changes and displays the correct output 2 Application appears as one of the tabs in a tabbed application and panel is in a different color Subtotal 10 CLICK HERE TO GET THE SOLUTION !!!!!!!!!