Lab05
.docx
keyboard_arrow_up
School
Wayne State University *
*We aren’t endorsed by this school
Course
3020
Subject
Computer Science
Date
Dec 6, 2023
Type
docx
Pages
4
Uploaded by MateMandrill3698 on coursehero.com
CSC 3020
Java
Programming
Lab 05
25 points
Due 10/12/2023 In Class
All assignments must be submitted by the Canvas.
No email or hard copy
is accepted. You
must follow the following format:
1.
include only the source file for each problem.
2.
Submit your file to the Canvas. You must submit your assignment on time; otherwise,
you will receive zero. In addition,
you cannot submit your file more than one time
.
3.
There will be several folders on the Canvas. You need to upload your file(s) using the
correct folder on the Canvas.
4.
Name each file: “
AccessID
_Lab05_
Q1
”.txt
5.
To upload your file(s):
1.
In Course Navigation, click the Assignments link.
2.
Click the title of the Lab.
3.
Click the
Submit
Lab button.
4.
Add
File
. ...
5.
Add Another
File
. ...
6.
Submit
Assignment. ...
7.
View
Submission
.
It is your responsibility to make sure that each file is uploaded correctly. If you
uploaded a wrong file, you receive zero; files will not be accepted after due date even if
you have a prove that the file is created before the due date.
Your program should be free of syntax errors (i.e. it must compile).
If it does
not, you will receive a zero.
Solution to this assignment will not be posted on Canvas; however, any question can be
discussed in the class upon request of a student.
Each solution text file MUST have the following flower box comment along with labels.
I would copy this into your code.:
/********************************************************************
Name:
Access ID:
Date:
mm/dd/yyyy
*******************************************************************/
CSC 3020
Java
Programming
Lab 05
25 points
Due 10/12/2023 In Class
Write a java program that simulates a Banking Application System (25 pts).
Coding Style
You must use appropriate variable names that are descriptive of the variable
contents, method function, etc.
You must use single-letter variables for for loops.
You must name variables, method names, and classes using standards presented in
class (i.e. camel case, or init capped).
When prompting for data, make sure there are no errors in response.
Respond
appropriately and then re prompt.
Each method MUST have a flower pot comment which also includes a description of
what the method does.
The Fan class
Design a
class
named
Fan to represent a fan. The
class
contains:
Three
constants
named
SLOW, MEDIUM, and FAST with the
values
1, 2, and 3 to
denote the fan speed.
The Fan class
A
private
int
data field
named
speed that specifies the speed of the fan (the
default
is SLOW).
A
private
Boolean
data field
named
on that specifies
whether
the fan is on (the
default
is
false
).
A
private
double
data field
named
radius that specifies the radius of the fan
(the
default
is 5).
A
string
data field
named
color that specifies the color of the fan (the
default
is blue).
The accessor and mutator
methods
for all four data fields.
A no-arg
constructor
that creates a
default
fan.
A
method
named
toString() that returns a
string
description for the fan.
o
If the fan is on, the
method
returns the fan speed, color, and radius in one
combined
string
.
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
Software Requirements:
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive.
2. Create a new project named LabExer6A. Set the project location to your own folder.
3. Create a simple guessing game (similar to Hangman or Hangaroo). In this game, the user guesses
a letter and then attempts to guess the word.
4. Create a Notepad file named words.txt which will store any number of words each written per line.
5. The Java program shall:
• randomly select a word from the list saved in words.txt;
• display a letter in which some of the letters are replaced by ?; for example, ED??A??ON
(for EDUCATION);
place the letter in the correct spot (or spots) in the word each time the user guesses a letter
correctly;
• inform the user if the guessed letter is not in the word; and
display a congratulatory message when the entire correct word has been deduced.
arrow_forward
A-List
Objective:
At the end of the exercise, the students should be able to:
▪ Create an adjacency list in Java.
Software Requirements:
▪ NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
1. Create a folder named LastName_FirstName in your local drive. (ex. Reyes_Mark)
2. Using NetBeans, create a Java project named AdjacencyList. Set the project location to your own
folder.
3. Create an adjacency list based on the given graph.
B
A
с
E
D
F
G
arrow_forward
At the end of the exercise, the students should be able to:
Create a simple game that handles
Software Requirements:
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
Create a folder named LastName_FirstName(please write Dahanyoon (ex. Reyes_Mark) in your local
Create a new project named LabExer5A. Set the project location to your own
The program shall:
generate a random number from 1 to 50 for a player to guess;
display a message that indicates whether the player’s guess is correct, too low, or too high; and
prompt the user to keep on guessing until the correct value is entered
Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following:
a number that is out of range (1 – 50)
a letter or any non-numeric character
Prompt the user so that he can guess again if an exception is
Display the number of total
Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.
arrow_forward
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Create a folder named Dahan_yoon in your local
Create a new project named LabExer5A. Set the project location to your own
The program shall:
generate a random number from 1 to 50 for a player to guess;
display a message that indicates whether the player’s guess is correct, too low, or too high; and
prompt the user to keep on guessing until the correct value is entered
Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following:
a number that is out of range (1 – 50)
a letter or any non-numeric character
Prompt the user so that he can guess again if an exception is
Display the number of total
Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.
arrow_forward
MSIT 501/BMME 8050 Project #1 Description: You are working for a carpeting and flooring company. You need a program to create an estimate for customers. There are three types of rooms that customers might have: square, rectangle and circle. Yes, some people have houses with rooms that are circles. The program should ask for the customer’s name and address. Then ask for the dimensions of the room, in feet. It should then determine the cost to put flooring in the room. We compute flooring based upon the area of the room in square feet. Flooring material costs $2.00 per square feet and installation costs $1.50 per square foot. The equations for calculating the square footage of rooms are as follows: • Square: area = side1 ^ 2 • Rectangle: area = side1 * side2 • Circle: area = radius ^ 2 * pi Once the user has entered the information, the program should print out the customer information. Then it should print the total square feet in the room followed by the estimate for the materials and…
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
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
Laboratory Exercise Guessing Game 2
Objective:
At the end of the exercise, the students should be able to:
Create a simple game that exhibits file input and
Software Requirements:
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local
Create a new project named LabExer6A. Set the project location to your own
Create a simple guessing game (similar to Hangman or Hangaroo). In this game, the user guesses a letter and then attempts to guess the
Create a Notepad file named txt which will store any number of words each written per line.
The Java program shall:
randomly select a word from the list saved in txt;
display a letter in which some of the letters are replaced by ?; for example, ED??A??ON (for EDUCATION);
place the letter in the correct spot (or spots) in the word each time the user guesses a letter correctly;
inform the user if the guessed letter is not in the word; and…
arrow_forward
Gradient FillIn this labwork are asked to write a GUI application again using AWT. This is a fairly easy labworkthat is more about getting used to synchronized online learning. You are expected to:• Draw two rectangles.• Both of them should be filled using GradientPaint() function of AWT. (Check out itsfunction definition that is listed below.)• The first gradient should be parallel to the diagonal of the first rectangle. The colorgradient should not be repeated (acyclic).• The second gradient should be horizontal. The color gradient should be repeated forthis one (cyclic).• You are free to choose the colors but other than that your output should be similar tothe example screenshot given below.
arrow_forward
Programming Fundamentals
Spring 2020 - 2021
Practical Exam 1
Weight 7 marks
Date 19/05/2021
Write a java program that reads one number, and display your full name many
times as the number is read.
Exam submission instructions:
1- You must submit the file with ".java" extension.
2- You must submit a video that record your computer screen when you are writing the
program. The video must be uploaded to google drive then add video link with
assignment submission. The assignment will not be marked without screen recording
video.
of
arrow_forward
Create a simple program for a quiz bee.
Software Requirements:
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive.
2. Create a new project named LabExer5B. Set the project location to your own folder.
3. The program shall:
contain an array of 10 multiple choice questions with three (3) choices each and
require the user to choose among A, B, or C;
Note: Cases are ignored. Lowercase letters are acceptable (a, b, c).
4. Create a try-catch structure to handle three (3) exceptions. These are when the user inputs the
following:
• an invalid letter (not A, B, or C)
• a number or any special character
• blank (no answer)
5. Prompt the user that he can answer again if any of the three (3) exceptions is thrown.
6. Display the score.
arrow_forward
Case study:
You are required to develop an application to keep track of meeting minutes. Every time a formal meeting takes
place, corresponding meeting minutes should be generated. Each meeting has a list of participants, which the
system receives from the caller of the meeting. The caller also assigns the role of meeting secretary to one of the
participants. The contents of the minutes are usually text, however, images and audio clips can also be attached to
the minutes. The number of attachments is not limited. For each meeting, minutes can only be created by the
assigned meeting secretary (for that meeting), who is also responsible for uploading the attachments. Minutes can
be created incrementally. Once the secretary is satisfied with his/her draft, the minutes can be broadcast to the
participants, who can then make comments on the minutes. Participants can make comments on the minutes as a
whole. These are global comments. They can also select particular sections of the minutes…
arrow_forward
✓ Exercises
Exercise: Write a method _ and _ that computes the region representing the intersection of two regions.
Exercise: Write a method
_contains__, which checks whether a n-dimensional point belongs to the region. Remember, a point belongs to the
region if it belongs to one of the rectangles in the region.
✓ Membership of a point in a region
#@title Membership of a point in a region
def region_contains (self, p):
### YOUR SOLUTION HERE
Region._contains = region_contains
[ ] # Tests 10 points.
assert (2, 1) in Region (Rectangle((0, 2), (0, 3)), Rectangle((4, 6), (5,8)))
assert (2, 1) not in Region (Rectangle((0, 1), (0, 3)), Rectangle((4, 6), (5, 8)))
Exercise: Write a method _le_ for regions such that R <= S if the region R is contained in the region S. You can test this by checking that
the difference between R and S is empty.
arrow_forward
Lab Assignment 2: Playfair Cipher
Overview: You are required to use the Playfair cipher to encrypt the message: "Butch." You will
do the encryption by hand. The key for encryption is “Govern." You will need to show your work
for the encryption process. Your submission should be a typed text file
arrow_forward
java
You may NOT write this program as a GUI (Graphical User Interface).
Write a program that reads a file named input.txt and writes a file that contains the same contents, but is named output.txt. The input file will contain more than one line when I test this and so should your output file. Do not use a path name when opening these files. This means the files should be located in the top level folder of the project. This would be the folder that contains the src folder, probably named FileCopy depending on what name you gave the project. Do not use a copy method that is supplied by Java. Your program must read the file line by line and write the file itself.
I will test it with a file, input.txt
do not write to input.txt*
Your class name must be FileCopy.
arrow_forward
java
You may NOT write this program as a GUI (Graphical User Interface).
Write a program that reads a file named input.txt and writes a file that contains the same contents, but is named output.txt. The input file will contain more than one line when I test this and so should your output file. Do not use a path name when opening these files. This means the files should be located in the top level folder of the project. This would be the folder that contains the src folder, probably named FileCopy depending on what name you gave the project. Do not use a copy method that is supplied by Java. Your program must read the file line by line and write the file itself.
do not write to input.txt*
Your class name must be FileCopy.
It should be in a package named mypackage
arrow_forward
USING PYTHON: Create a Python class, Document.
Upon initialization, the instances of this class will take in one optional string parameter, initial_thoughts, which defaults to an empty string if not given during instance creation. In
addition, the instances of this class will also have the following attributes:
Input Format
Assume the inputs are user inputs that are valid commands and can access the attributes or invoke a method of the Document instance.
Constraints
String arguments when creating a Document instance and when invoking the add_words method will be limited to 1000 characters at maximum.
Output Format
The output will be composed of seven lines with the first 2 lines showing some information about the Document object and the next 5 lines showing the current values of the instance attributes.
Sample Input 0
essay Document ("I gotta start with something.")
exit
Sample Output 0
This Document instance has 4 instance attributes.
The class used to create this object has 5 methods…
arrow_forward
Make use of C# in Visual Studio.
The below form will represent the main form from which the user will navigate to the other forms. Meaning each button should be linked to the appropriate form. E.g. If button Manage Addresses is clicked the form managed addresses should be displayed. The Exit button should successfully terminate the program.
Create a void method for each button and name them as follow: LinkToAddresses (), LinkToCustomers (), LinkToDrivers (), LinkToStatus (), and LinkToFreight (). The methods should be called under the appropriate button. For the exit button create a void method named AppExit () this should terminate the program.
arrow_forward
2.
An instructor created a submission folder for coding submissions from students. The instructor wants to maintain all access to the folder for herself, but wants to give the grading assistants 'read' and 'execute' permission to the folder. However, the grading assistants cannot change anything in the folder. She adds a group 'grader' with the grading assistants for the folder. Nobody else should have any access to the submission folder. The instructor should use : chmod ________ to set the access permission for the submission folder to achieve the above goal.
Hint:
Indicate the decimal number corresponding to the permission.
arrow_forward
Instructions:
IMPORTANT: This is a continuation of the previous part of the project and assumes that you are starting with code that fulfills all requirements from that part of the project.
Modify the your code from the previous part of the project to make it modular.
In addition to the main method, your code must include the following static methods:
Method 1 - displayTitle
A method that creates a String object in memory to hold the text “Computer Hardware Graphics Quality Recommendation Tool” and displays it
Method 2 – getResolutionString
A method that accepts an integer value (1, 2, 3, or 4) that denotes the monitor resolution. The method should return the appropriate String representation of the monitor resolution. For example, if the method is passed an integer value of 1, it should return a String with a value of “1280 x 720”. (See Step 4 of Project 1)
Method 3 – getMultiplierValue
A method that accepts an integer value (1, 2, 3, or 4) that denotes the monitor resolution and…
arrow_forward
ExecutorService method "execute":
obtains an ExecutorService that creates new threds as they are needed
notifies the ExecutorService to stop accepting new tasks, but continues executing taskst that have alredy been submitted
All of the above
None of the above
arrow_forward
Software Requirements:
• Latest version of NetBeans IDE
• Java Development Kit (JDK) 8
Procedure:
1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive.
2. Create a new project named LabExer5A. Set the project location to your own folder.
3. The program shall:
generate a random number from 1 to 50 for a player to guess;
• display a message that indicates whether the player's guess is correct, too low, or too high;
and
prompt the user to keep on guessing until the correct value is entered
4. Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the
following:
a number that is out of range (1 – 50)
a letter or any non-numeric character
5. Prompt the user so that he can guess again if an exception is thrown.
6. Display the number of total guesses.
Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.
Sample Output:
Guess a number from 1 to 50!
30
Too high. Try again.
15
Too…
arrow_forward
Social Media is progressing day by day. It is becoming strong tool which anybody can use to become famous.
Celebrities also use social media for their publicity and popularity.
You are required to create a small application which keeps track of ten celebrities(using ArrayList) Instagram profile (name, id, followers) ask data from user write this data to file, after that read it from file and display who has highest followers on Instagram on the screen.
Create Profile class with above attributes and appropriate methods.
Then create File Manager Class which holds ArrayList of profile and read and write methods to write data to file and read from file.
In main ask values form user and then call appropriate methods, then display the values in the end along with the celebrity with highest followers
Programming language : Java
arrow_forward
Computer Science
Help with C# programming in Microsoft Visual Studio:
You will be creating a program that uses a GUI to allow the user to enter information about an employee. In addition to the main class you create, there will also be four additional classes named fileOutput, baseEmployee, superEmployee and advancedEmployee which you will have to create. For this problem, the baseEmployee class will need to accept user input for a name, email and address for a base employee. The advancedEmployee class should be able to extend the baseEmployee, by allowing an hourly rate and hours worked to be entered. Hours worked must be in the range of 0 to 80 and hourly rate is in the range of 10 to 42.50. The superEmployee class will then extend the advancedEmployee class and allow permission level of high, medium or low to be entered, along with their office number. The program should show a radio button that allows the user to choose whether or not the user is a base employee, advanced…
arrow_forward
Force Completion
This test can be saved and resumed at any polnt until time has expired. The timer will continue to run if you
leave the test.
Remaining Time: 49 minutes, 11 seconds.
* Question Completion Status:
A Moving to another question will save this response.
« >
Question 4
8 points
Save Answer
(10101)2 xor (10111)2 = (abcde)2 based on the equation calculate
((not b or d) and e).
A Moving to another question will save this response.
« »
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
Task Performance
Student List
Objective:
At the end of the exercise, the students should be able to:
• Map values in Java and Python.
Software Requirements:
• NetBeans IDE
Java Development Kit (JDK) 8
Python 3.7 or higher
Procedure:
1. Create a folder named LastName_FirstName in your local drive. (ex. Reyes_Mark)
2. Using NetBeans, create a Java project named StudentList. Set the project location to your own
folder.
3. Import Scanner, Map, and HashMap from the java.util package.
4. Create an empty hash map named students.
5. The output shall:
5.1. Ask three (3) of your classmates to enter their student number (key) and first name (value).
5.2. Display the keys and values of the map.
5.3. Delete the mapping of the third entry.
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
can NOT edit code one grey line (start-4 & 8-end of code)
new JAVA code will have to be added in the middle like in the photo.
arrow_forward
In C# language using Microsoft Visual Studio in Windows Forms App (.NET Framework)
A slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money, which the slot machine dispenses back to the user. Design a program that simulates a slot machine. When the program runs, it should do the following: Ask the user to enter the amount of money he or she wants to insert into the slot machine.
Create an application that simulates a slot machine.
The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols.
arrow_forward
Develop an instantiable class for an IT Support Application in java. Display a menu for selecting the following:
1.Enter your request
2. Display last request
3. Highest priority request
4. Lowest priority request
5. Average Request priority
6.Exit Application
Be able to select these options and input using scanner class only. Arrays not allowed.
arrow_forward
Task Class Requirements
The task object shall have a required unique task ID String that cannot be longer than 10 characters. The task ID shall not be null and shall not be updatable.
The task object shall have a required name String field that cannot be longer than 20 characters. The name field shall not be null.
The task object shall have a required description String field that cannot be longer than 50 characters. The description field shall not be null.
Verify with Juint testing as well
arrow_forward
11.
Which among the following classes are used in decoding data? They don't have to be used together every time.
Select all answers that apply. Take note that this is a right minus wrong question.
Which among the following classes are used in decoding data? They don't have to be used together every time.
Select all answers that apply. Take note that this is a right minus wrong question.
1. PropertyListDecoder
2.JSONDecoder
3.URL
4. FileDecoder
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Related Questions
- Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: 1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive. 2. Create a new project named LabExer6A. Set the project location to your own folder. 3. Create a simple guessing game (similar to Hangman or Hangaroo). In this game, the user guesses a letter and then attempts to guess the word. 4. Create a Notepad file named words.txt which will store any number of words each written per line. 5. The Java program shall: • randomly select a word from the list saved in words.txt; • display a letter in which some of the letters are replaced by ?; for example, ED??A??ON (for EDUCATION); place the letter in the correct spot (or spots) in the word each time the user guesses a letter correctly; • inform the user if the guessed letter is not in the word; and display a congratulatory message when the entire correct word has been deduced.arrow_forwardA-List Objective: At the end of the exercise, the students should be able to: ▪ Create an adjacency list in Java. Software Requirements: ▪ NetBeans IDE Java Development Kit (JDK) 8 Procedure: 1. Create a folder named LastName_FirstName in your local drive. (ex. Reyes_Mark) 2. Using NetBeans, create a Java project named AdjacencyList. Set the project location to your own folder. 3. Create an adjacency list based on the given graph. B A с E D F Garrow_forwardAt the end of the exercise, the students should be able to: Create a simple game that handles Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: Create a folder named LastName_FirstName(please write Dahanyoon (ex. Reyes_Mark) in your local Create a new project named LabExer5A. Set the project location to your own The program shall: generate a random number from 1 to 50 for a player to guess; display a message that indicates whether the player’s guess is correct, too low, or too high; and prompt the user to keep on guessing until the correct value is entered Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following: a number that is out of range (1 – 50) a letter or any non-numeric character Prompt the user so that he can guess again if an exception is Display the number of total Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.arrow_forward
- Latest version of NetBeans IDE Java Development Kit (JDK) 8 Create a folder named Dahan_yoon in your local Create a new project named LabExer5A. Set the project location to your own The program shall: generate a random number from 1 to 50 for a player to guess; display a message that indicates whether the player’s guess is correct, too low, or too high; and prompt the user to keep on guessing until the correct value is entered Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following: a number that is out of range (1 – 50) a letter or any non-numeric character Prompt the user so that he can guess again if an exception is Display the number of total Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.arrow_forwardMSIT 501/BMME 8050 Project #1 Description: You are working for a carpeting and flooring company. You need a program to create an estimate for customers. There are three types of rooms that customers might have: square, rectangle and circle. Yes, some people have houses with rooms that are circles. The program should ask for the customer’s name and address. Then ask for the dimensions of the room, in feet. It should then determine the cost to put flooring in the room. We compute flooring based upon the area of the room in square feet. Flooring material costs $2.00 per square feet and installation costs $1.50 per square foot. The equations for calculating the square footage of rooms are as follows: • Square: area = side1 ^ 2 • Rectangle: area = side1 * side2 • Circle: area = radius ^ 2 * pi Once the user has entered the information, the program should print out the customer information. Then it should print the total square feet in the room followed by the estimate for the materials and…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_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_forwardLaboratory Exercise Guessing Game 2 Objective: At the end of the exercise, the students should be able to: Create a simple game that exhibits file input and Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local Create a new project named LabExer6A. Set the project location to your own Create a simple guessing game (similar to Hangman or Hangaroo). In this game, the user guesses a letter and then attempts to guess the Create a Notepad file named txt which will store any number of words each written per line. The Java program shall: randomly select a word from the list saved in txt; display a letter in which some of the letters are replaced by ?; for example, ED??A??ON (for EDUCATION); place the letter in the correct spot (or spots) in the word each time the user guesses a letter correctly; inform the user if the guessed letter is not in the word; and…arrow_forwardGradient FillIn this labwork are asked to write a GUI application again using AWT. This is a fairly easy labworkthat is more about getting used to synchronized online learning. You are expected to:• Draw two rectangles.• Both of them should be filled using GradientPaint() function of AWT. (Check out itsfunction definition that is listed below.)• The first gradient should be parallel to the diagonal of the first rectangle. The colorgradient should not be repeated (acyclic).• The second gradient should be horizontal. The color gradient should be repeated forthis one (cyclic).• You are free to choose the colors but other than that your output should be similar tothe example screenshot given below.arrow_forward
- Programming Fundamentals Spring 2020 - 2021 Practical Exam 1 Weight 7 marks Date 19/05/2021 Write a java program that reads one number, and display your full name many times as the number is read. Exam submission instructions: 1- You must submit the file with ".java" extension. 2- You must submit a video that record your computer screen when you are writing the program. The video must be uploaded to google drive then add video link with assignment submission. The assignment will not be marked without screen recording video. ofarrow_forwardCreate a simple program for a quiz bee. Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: 1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive. 2. Create a new project named LabExer5B. Set the project location to your own folder. 3. The program shall: contain an array of 10 multiple choice questions with three (3) choices each and require the user to choose among A, B, or C; Note: Cases are ignored. Lowercase letters are acceptable (a, b, c). 4. Create a try-catch structure to handle three (3) exceptions. These are when the user inputs the following: • an invalid letter (not A, B, or C) • a number or any special character • blank (no answer) 5. Prompt the user that he can answer again if any of the three (3) exceptions is thrown. 6. Display the score.arrow_forwardCase study: You are required to develop an application to keep track of meeting minutes. Every time a formal meeting takes place, corresponding meeting minutes should be generated. Each meeting has a list of participants, which the system receives from the caller of the meeting. The caller also assigns the role of meeting secretary to one of the participants. The contents of the minutes are usually text, however, images and audio clips can also be attached to the minutes. The number of attachments is not limited. For each meeting, minutes can only be created by the assigned meeting secretary (for that meeting), who is also responsible for uploading the attachments. Minutes can be created incrementally. Once the secretary is satisfied with his/her draft, the minutes can be broadcast to the participants, who can then make comments on the minutes. Participants can make comments on the minutes as a whole. These are global comments. They can also select particular sections of the minutes…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning