COMP228FinalTestF16 (1)
.docx
keyboard_arrow_up
School
Seneca College *
*We aren’t endorsed by this school
Course
228
Subject
Computer Science
Date
Jan 9, 2024
Type
docx
Pages
2
Uploaded by GeneralDragon2895
Java Programming
COMP-228
FINAL TEST - Final
Student: ______________________
Be sure to read the following general instructions carefully:
-
This lab test must be completed individually by all the students.
-
You should submit the entire project through dropbox link on eCentennial immediately
after demonstration.
-
Submit a
mute video
of running your solution (simple video up to five minutes), The
video shows the following:
1.
Show your name and ID using a text file.
2.
Scrolling your code on-screen slowly, this code should be compatible
with the submitted project.
3.
Show the results as required.
-
Exercise 1
Start
a
new
IntelliJ
Java
project
.
Name
the
project:
YourFullName_COMP228_FinalTest_Fall2023
.
For
example:
JohnSmith_COMP228_FinalTest_Fall2023.
DO NOT
create a package in this project.
Write a GUI application in Java that allows user to select students by their city.
The user should be able to enter the
city
. The application should retrieve the student information
from an Oracle table named
Student
. Here is the definition of the table:
CREATE TABLE Students (
studentID char(9) NOT NULL,
firstName varchar (20) NOT NULL,
lastName varchar (20) NOT NULL,
address varchar (30) NOT NULL,
city varchar(30) NOT NULL,
province char(2) NOT NULL,
postalCode char(6) NOT NULL,
PRIMARY KEY (studentID)
Final Lab Test
Page
1
of
2
Java Programming
COMP-228
);
Populate the table with several rows as below:
insert into Students values('300111222','Sam', 'Malone', '10
Somewhere Road', 'Toronto','ON','M1Y2H2');
commit;
The information should be displayed in a JTextArea component which has scrolling abilities. Use
“\t” and “\n” to format the display.
Use the most appropriate layout manager classes to implement the layout of this GUI.
(100
marks)
Evaluation:
Functionality
Correct implementation of UI (using
SWING or JavaFX components, event
handling)
35%
Correct implementation of data access
using JDBC (connecting with server,
executing a prepared statement,
displaying results)
50%
Comments, correct naming of variables,
methods, classes, etc.
5%
Friendly input/output
10%
Total
100%
Final Lab Test
Page
2
of
2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Super Ghost Project
Rule changes:
The premise of the game remains the same, there are two players adding words to a growing word fragment. Each player will take turns attempting to add letters to a growing word fragment. The letter you select should attempt to force your opponent to spell a word or create a word fragment that has no possibility of creating a word. Unlike the prior ghost competition, when it is your turn you are allowed to add a letter to either the front or back of the word fragment.
Winning Criteria:
If your opponent spells a word that is at least 6 characters long
if your opponent creates a word fragment that has no possibility of creating a word
if your opponent takes longer than 60 seconds to select a word.
Tip: If you are the first player you can only spell words that are odd length thus you can only lose when you spell words that are odd but you can win when your opponent spells words that are even length. Accordingly, if you are the first player you should…
arrow_forward
Course Title : Operating SystemQuestion :
How you will create new user using terminal in Ubuntu? Add screenshots of all steps for new user creation including terminal and Login page in Answer sheet. Every student has to create new user as of his/her arid number for example (18-arid-2929).
Note: screenshots are mandatory.
arrow_forward
Use Java language ONLY
Mastermind is a code-breaking game between two players, the codemaker (in this case the computer) and the codebreaker (the player).
How to Play
See the following video https://www.youtube.com/watch?v=XwuwWTH39ac.
Project Requirements
The goal of the project is to implement a text-based/menu-driven Mastermind game.
The game will include a menu from which the user will choose:
See Rules
Play Game
See Highest Score
Quit
When the user chooses to play a game, the computer will generate a three-position code using five colors (Red/Blue/White/Yellow/Green).
The player will try to break the code by choosing a color for each of the three positions available - color repeats are allowed. Example: R G B (Red-Green-Blue)The computer will provide feedback using three pins (one for each color) placed in non-related order:
Red Pin (R)– A color is part of the code and has been placed on the right position.
White Pin(W) – A color is part of the code but has been placed…
arrow_forward
Implement the using Windows form App(.NET Framework) c# :
1- creat a Form titled “ Students ”
2- Add text box with max 100 letter, where student can enter his name
3- Add Grade combobox where student can select his grade (A-B-C-D-E-F)
4- Add button “Add”, when clicked the name and grade are added to the data view5- Add button “Stat” when clicked another form appears6- A data grid appears with grade vs count statistic (ex : A ,3 )
(please respond with screenshots )
arrow_forward
multiplayer web based game——guess number (use socket.io, html, js)
3-player join the game with their name.Random number range from 1 to 100 will be show on the public screen.Players take turns entering numbers.The player who guesses the number will fail and be displayed on the public screen.
arrow_forward
Submission Instructions
Follow the instructions for How to Submit Programming Assignments.
Assignment
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).
Then create a new Java application called "PatternMaker" (without the quotation marks) according to the following guidelines.
The program prompts the user for five input values:
An integer value between 1 and 10 (inclusive) for the number of rows to be printed
A second integer value between 1 and 10 (inclusive) for the number of columns to be printed
A string value for the starting string of the pattern
A string value for the second string of the pattern
A string value that separates the first two strings
The program must use nested for loops to print a rectangular array of alternating first and second strings of the pattern, separated by the separator string and such that the first string in the first row uses the "first string" provided by the user, but…
arrow_forward
Programming II Lab 6 Task
In this task, you should design and implement a program that uses youtube-dl to download
youtube videos.
• You can use SceneBuilder.
• You must open a save dialog after the users click Download.
• You should get the video name by parsing the link HTML.
• If the link is not correct you should informe the user.
• Optional (Bouns): Implement progress bar.
by javafx
Sample UI
Untitled
O X
YouTube
Downloader v.1
By: Your Full Name - Your UID
Enter Youtube Link:
https://www.youtube.com/watch?v=dQw4w9WgXcQ
Downloading (Video Name)
Download
Reset
Note: This is just a sample, please do something else XD.
arrow_forward
Chapter 18 Problem 38.PE Textbook: Introduction to Java programming and datastructure.
11th Edition
Y. Daniel Liang
Publisher: PEARSON
ISBN: 9780134670942
This code is taken from your website does not work.
package e38;
import javafx.application.Application;import javafx.event.ActionEvent;import javafx.event.EventHandler;import javafx.scene.Scene;import javafx.scene.control.Button;
import javafx.stage.Stage;import javafx.geometry.Pos;import javafx.scene.control.Label;import javafx.scene.control.TextField;import javafx.scene.control.Textfield;import javafx.scene.layout.BorderPane;import javafx.scene.layout.HBox;import javafx.scene.layout.Pane;import javafx.scene.shape.Line;import javafx.stage.Stage;
public class E38 extends Application { @Override public void start(Stage primaryStage) { // Create a pane TreePane tp = new TreePane(); // Create a textfield TextField tfOrder = new TextField(); // Set the Depth…
arrow_forward
Project Proposal – : Develop an idea and put it down on paper (typed). Your proposal should include a title, a description of your game: name PING PONG and
a description of your user interface. You can use a drawing if it helps you.
arrow_forward
Watch the video below about how sets are used in computer programming. Write a brief response about what you saw in the video.
Give another example of how sets are used in your life.
https://www.youtube.com/watch?v=S0InSH_TgaI
arrow_forward
1. Code-Tracing
- Without running / testing the following code, predict what the following program would print on the screen if you printed freeze and then boil. Write your answer in the comment section when submitting your work. For help with code-tracing see the code tracing page in
this module.
ments
freeze - int(32)
boil - int(212)
freeze - 0
boil - 100
print(freeze, boil) # what would this print to the monitor?
Research
• Submit your answer in the comment section.
arrow_forward
Lab conditions:
This lab exercise to be completed by the end of the class. No late submission will be accepted
Work as group of two students.
Submit Word document file on D2L
Make sure your following naming format as listed below:
Last name, First Name:
Last name, First Name:
Questions:
1. Research, discuss Explain the purpose of different personal computer (PC) hardware components.
Make sure to address all the aspect of the topic.
Partial list of opcodes:
2. Desktop Computer DIY. Suppose you decide to build a desktop by yourself and your budget is
around $1000 (without OS). Discuss with your team members and list all the parts and tools you have
to purchase with price. List the technical Details and explain what your desktop will be used for, such
as listen to music, word document, 3D design, software development, watch movie and so on.
3. Download and run CPU-Z. Paste your screenshots (technical details) below.
4. Challenge Question
Consider the hypothetical machine:
Instruction…
arrow_forward
Initial assumption: A user or a group of users have one or more digital photographs to be uploaded to the picture sharing site. These are saved on either a tablet or laptop computer. They have successfully logged on to KidsTakePics.
write a scenarios about approve uploded photos for Kids Take Pics.
arrow_forward
Python question please include all steps and screenshot of code. Also please provide a docstring, and comments through the code, and test the given examples below. Thanks.
If there is a vote at a meeting, there are several possible outcomes based on the numberof yes and no votes (abstains are not counted). If all the votes are yes, then the proposalpasses "unanimously", if at least 2/3 of the votes are yes, then the proposal passes with"absolute majority", if at least 1/2 of the votes are yes, then the proposal passes by"simple majority", and otherwise it fails. Write function vote() that takes as input thenumber of yes votes and the number of no votes and then prints the outcome of the vote.>>> votes(9, 0)proposal passes unanimously>>> votes(6, 3)proposal passes with absolute majority>>> votes(5, 4)proposal passes with simple majority>>> votes(4, 5)
arrow_forward
The Problems - contains only problems from the last 2 contests
Separate Un-Attempted, Attempted and All cards Problem Difficulty Rating - The
Featured drop-down menu has different difficulty ranges so you can try problems that
best suit your experience.
Popular topics and brands Like most users, Chef didn't know that he could add
problems to his personal to-do list by clicking the magic "+" symbol in the upper
right corner of each problem page. But once he found out about it, he went crazy and
added a lot of problems to his to-do list without looking at their difficulty rating.
Rajesh is a beginner and ideally should only try to solve problems strictly below
10001000. Given the difficulty rating list of problems in Chef's to-do list, please help
him determine how many of these problems Chef should remove from his to-do list
so he is left with only problems with a difficulty rating of less than 10001000.
Note: Please answer the question in Python only:
Input
1
4
999 1000 1001 1002…
arrow_forward
VB create this program on visual basics or any other programming GUI langauge Create one object – Person, and code it. Create the menus shown in the demo program. The interface is a bit different from what you have done to this point. Play with the program to see how it works. The hungarian notation for a date control is dte.
Commands
The key commands of this program are:
Add a Person
Remove a Person
Display next person
Display previous person
Display first person
Display last person.
Create the programming to make these components work. Refer to the power point notes for examples of how the code needs to be set up.
Protecting Data against Accidental change
Change the display to allow the user to enter data into text boxes, but protect the data from being accidentally changed by setting the ReadOnly property of the text boxes appropriately. This should be a sub. Call it as you need it. The Date has no ReadOnly property, use the Enabled property instead for this control. Use the enabled…
arrow_forward
Murach's javascript and Jquery 4th edition (ch9 animation)
I need help with this assignment, please. thanks
Modify a carousel to use animationIn this exercise, you’ll modify a carousel application so that when an image in the carousel is clicked, an enlarged image is displayed using animation.1. Open the application in this folder:carouselThen, run the application and notice that an enlarged image of the first book in the carousel is displayed.2. Review the HTML for the application, and notice that it contains an img element with an id of “image” following the heading. Also notice that the href attributes of the <a>elements in the carousel are set to the URL of the enlarged image to be displayed when the associated carousel image is clicked.3. Code an event handler for the click event of the <a> elements in the list. This event handler should start by getting the URL for the image to be displayed. Then, it should assign this URL to the enlarged image.4. Add animation to…
arrow_forward
At the end of this specific task, students should be able to:• Create and work with Loops• Handle and manipulate strings • (Learning Units 4 and 5).It is good practice to leave your main branch as your long live branch, this means that the code on this branch is always in perfect working order and tested. We make use of feature branches in order to ensure that any code we push to GitHub does not break our main branch. You can create a feature branch by running the following command.git checkout -b KhanbanTasks (you can use any branch name)** You are welcome to make use of GitHub desktop or your IDE to push code to GitHub if you are not comfortable with using the command line.You can now add the following functionality to your application:1. The users should only be able to add tasks to the application if they have logged in successfully.2. The applications must display the following welcome message: “Welcome to EasyKanban”.3. The user should then be able to choose one of the following…
arrow_forward
Super Ghost Project (Please Help me I don't really know and have no idea ) (CODE PLEASE )
Rule changes:
The premise of the game remains the same, there are two players adding words to a growing word fragment. Each player will take turns attempting to add letters to a growing word fragment. The letter you select should attempt to force your opponent to spell a word or create a word fragment that has no possibility of creating a word. Unlike the prior ghost competition, when it is your turn you are allowed to add a letter to either the front or back of the word fragment.
Winning Criteria:
If your opponent spells a word that is at least 6 characters long
if your opponent creates a word fragment that has no possibility of creating a word
if your opponent takes longer than 60 seconds to select a word.
Tip: If you are the first player you can only spell words that are odd length thus you can only lose when you spell words that are odd but you can win when your opponent spells words that are…
arrow_forward
The parameter is incorrect. The picture size is not supported.
Each image must have a resolution of 40 to 2600 pixels.
arrow_forward
In java pls
arrow_forward
Assignment
Create a video showing how your game runs, play the game and explain how it plays. (don't worry
about code in video).
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Related Questions
- Super Ghost Project Rule changes: The premise of the game remains the same, there are two players adding words to a growing word fragment. Each player will take turns attempting to add letters to a growing word fragment. The letter you select should attempt to force your opponent to spell a word or create a word fragment that has no possibility of creating a word. Unlike the prior ghost competition, when it is your turn you are allowed to add a letter to either the front or back of the word fragment. Winning Criteria: If your opponent spells a word that is at least 6 characters long if your opponent creates a word fragment that has no possibility of creating a word if your opponent takes longer than 60 seconds to select a word. Tip: If you are the first player you can only spell words that are odd length thus you can only lose when you spell words that are odd but you can win when your opponent spells words that are even length. Accordingly, if you are the first player you should…arrow_forwardCourse Title : Operating SystemQuestion : How you will create new user using terminal in Ubuntu? Add screenshots of all steps for new user creation including terminal and Login page in Answer sheet. Every student has to create new user as of his/her arid number for example (18-arid-2929). Note: screenshots are mandatory.arrow_forwardUse Java language ONLY Mastermind is a code-breaking game between two players, the codemaker (in this case the computer) and the codebreaker (the player). How to Play See the following video https://www.youtube.com/watch?v=XwuwWTH39ac. Project Requirements The goal of the project is to implement a text-based/menu-driven Mastermind game. The game will include a menu from which the user will choose: See Rules Play Game See Highest Score Quit When the user chooses to play a game, the computer will generate a three-position code using five colors (Red/Blue/White/Yellow/Green). The player will try to break the code by choosing a color for each of the three positions available - color repeats are allowed. Example: R G B (Red-Green-Blue)The computer will provide feedback using three pins (one for each color) placed in non-related order: Red Pin (R)– A color is part of the code and has been placed on the right position. White Pin(W) – A color is part of the code but has been placed…arrow_forward
- Implement the using Windows form App(.NET Framework) c# : 1- creat a Form titled “ Students ” 2- Add text box with max 100 letter, where student can enter his name 3- Add Grade combobox where student can select his grade (A-B-C-D-E-F) 4- Add button “Add”, when clicked the name and grade are added to the data view5- Add button “Stat” when clicked another form appears6- A data grid appears with grade vs count statistic (ex : A ,3 ) (please respond with screenshots )arrow_forwardmultiplayer web based game——guess number (use socket.io, html, js) 3-player join the game with their name.Random number range from 1 to 100 will be show on the public screen.Players take turns entering numbers.The player who guesses the number will fail and be displayed on the public screen.arrow_forwardSubmission Instructions Follow the instructions for How to Submit Programming Assignments. Assignment First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create a new Java application called "PatternMaker" (without the quotation marks) according to the following guidelines. The program prompts the user for five input values: An integer value between 1 and 10 (inclusive) for the number of rows to be printed A second integer value between 1 and 10 (inclusive) for the number of columns to be printed A string value for the starting string of the pattern A string value for the second string of the pattern A string value that separates the first two strings The program must use nested for loops to print a rectangular array of alternating first and second strings of the pattern, separated by the separator string and such that the first string in the first row uses the "first string" provided by the user, but…arrow_forward
- Programming II Lab 6 Task In this task, you should design and implement a program that uses youtube-dl to download youtube videos. • You can use SceneBuilder. • You must open a save dialog after the users click Download. • You should get the video name by parsing the link HTML. • If the link is not correct you should informe the user. • Optional (Bouns): Implement progress bar. by javafx Sample UI Untitled O X YouTube Downloader v.1 By: Your Full Name - Your UID Enter Youtube Link: https://www.youtube.com/watch?v=dQw4w9WgXcQ Downloading (Video Name) Download Reset Note: This is just a sample, please do something else XD.arrow_forwardChapter 18 Problem 38.PE Textbook: Introduction to Java programming and datastructure. 11th Edition Y. Daniel Liang Publisher: PEARSON ISBN: 9780134670942 This code is taken from your website does not work. package e38; import javafx.application.Application;import javafx.event.ActionEvent;import javafx.event.EventHandler;import javafx.scene.Scene;import javafx.scene.control.Button; import javafx.stage.Stage;import javafx.geometry.Pos;import javafx.scene.control.Label;import javafx.scene.control.TextField;import javafx.scene.control.Textfield;import javafx.scene.layout.BorderPane;import javafx.scene.layout.HBox;import javafx.scene.layout.Pane;import javafx.scene.shape.Line;import javafx.stage.Stage; public class E38 extends Application { @Override public void start(Stage primaryStage) { // Create a pane TreePane tp = new TreePane(); // Create a textfield TextField tfOrder = new TextField(); // Set the Depth…arrow_forwardProject Proposal – : Develop an idea and put it down on paper (typed). Your proposal should include a title, a description of your game: name PING PONG and a description of your user interface. You can use a drawing if it helps you.arrow_forward
- Watch the video below about how sets are used in computer programming. Write a brief response about what you saw in the video. Give another example of how sets are used in your life. https://www.youtube.com/watch?v=S0InSH_TgaIarrow_forward1. Code-Tracing - Without running / testing the following code, predict what the following program would print on the screen if you printed freeze and then boil. Write your answer in the comment section when submitting your work. For help with code-tracing see the code tracing page in this module. ments freeze - int(32) boil - int(212) freeze - 0 boil - 100 print(freeze, boil) # what would this print to the monitor? Research • Submit your answer in the comment section.arrow_forwardLab conditions: This lab exercise to be completed by the end of the class. No late submission will be accepted Work as group of two students. Submit Word document file on D2L Make sure your following naming format as listed below: Last name, First Name: Last name, First Name: Questions: 1. Research, discuss Explain the purpose of different personal computer (PC) hardware components. Make sure to address all the aspect of the topic. Partial list of opcodes: 2. Desktop Computer DIY. Suppose you decide to build a desktop by yourself and your budget is around $1000 (without OS). Discuss with your team members and list all the parts and tools you have to purchase with price. List the technical Details and explain what your desktop will be used for, such as listen to music, word document, 3D design, software development, watch movie and so on. 3. Download and run CPU-Z. Paste your screenshots (technical details) below. 4. Challenge Question Consider the hypothetical machine: Instruction…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT