Lab08
.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
5
Uploaded by MateMandrill3698
CSC 3020
Java
Programming
Lab 08
25 points
Due 11/2/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
_Lab08.docx
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.
Submit
Assignment. ...
6.
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 08
25 points
Due 11/2/2023 In Class
Hospital Billing System (25 Points)
In this project, you will design a class and write a program to computerize the
billing system of a hospital.
1.
(1 point) Create a UML for the 4 classes described below.
2.
(2 points) Design the class
Person
. Two common attributes of a person are the
person’s first name and last name. The typical operations on a person’s name are to
set the name and print the name.
3.
(2 points) Design the class
Doctor
, inherited from the class Person with an additional
data member to store a doctor’s specialty. Add appropriate constructors and
methods to initialize, access, and manipulate the data members.
4.
(4 points) Design the class
Bill
with data members to store a patient’s ID and the
patient’s hospital charges such as pharmacy charges for medicine, the doctor’s fee,
and the room charges. Add appropriate constructors and methods to initialize,
access, and manipulate the data members.
5.
(4 points) Design the class
Patient
, inherited from the class Person with additional
data members to store a patient’s ID, date of birth, attending physician’s name, the
date when the patient was admitted in the hospital, and the date when the patient
was discharged from the hospital. Add appropriate constructors and methods to
initialize, access, and manipulate the data members.
6.
(3 points) Override method toString in each of the above classes.
7.
(9 points) Write a program (TestHospital class) to test your classes. Print patient’s
name, attending physician, admit date, discharge date, and all charges to console
window. Your printout must match the sample output below. Your program should
process more than one patient.
CSC 3020
Java
Programming
Lab 08
25 points
Due 11/2/2023 In Class
Please keep these points in mind:
3 points will be deducted for not including comments.
2 points will be deducted for not having at least 2 billing examples.
0.5 point will be deducted for EACH instance of not formatting dates
mm/dd/yyyy.
0.5 point will be deducted for EACH instance for not formatting dollar
amounts $#,##0.00
1 point will be deducted for incorrect bill total.
2 points will be deducted for not making a reasonable attempt to match
output.
There should be at least 3 scenarios:
Perfect Example of entering and outputting requested data for 2 patients.
Examples of entering incorrect date, and prompting for a correct date.
Examples of entering incorrect dollar amounts, and prompting for a
correct one.
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
java programming
arrow_forward
Create a simple program for a quiz
Software Requirements:
Latest version of NetBeans IDE
Java Development Kit (JDK) 8
Procedure:
Create a folder named LastName_FirstName (ex. Dahan yoon) in your local
Create a new project named LabExer5B. Set the project location to your own
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).
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)
Prompt the user that he can answer again if any of the three (3) exceptions is
Display the score.
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
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
✓ 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
Assignment #1:Dear Students, Please note the following before answer question below:1. Each student should answer all questions saved in word file and upload it on e-learning.2. The assignment must be submitted on time.3. Any Copy/Paste submitted will be graded ZERO.Suppose you have a program to send message to the second activity: The following button on the second activity is to go back to the first activity. The figures below clearly describe this process:Note:The first activity named: SendMessageActivityThe second activity named: BackActivityThe first button method named OnSend()The second button method named: OnBack()
Write an android program that does the following:1. Send Message button to move from the 1st activity to the second activity.2. Back button to move back from the 2nd activity to the 1st activity
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
i want you to draw a er model dont give me this draws all tutors answred by it :(i want new one only photos
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
..
arrow_forward
Python help
arrow_forward
Screen shot please
arrow_forward
Step1-Study the scenario below and create a Java Program for Builders Warehouse, The program must consist of a class called Materials to handle the details of the materials. The program should read the materials details from the material.txt file then use a LinkedList to store the material details. Then finally the products stored in the LinkedList must be displayed like the sample code below
step 2-There must be clear code and a screenshot of the code running.
arrow_forward
Computer Science
The goal of this assignment is to create an app that can capture, tag, save, and retrieve photos on your smartphone.Capture: When clicked, it takes a picture and shows a thumbnail image. Tag: A user can type multiple tags (separated by a “;”). Save: When clicked, it saves the photo in a database along with the tags. Load: A user can specify one or more tags. Your app will find and show the first photo that had any of those tags. When there are multiple photos matching the criteria, the App should have an UI element to show them one by one, e.g., when the user slides a slider.
arrow_forward
Python3
arrow_forward
C++ Visual Studio 2019
NumDays, TimeOff, and Personnel Report
Complete #4, 5 & 6 . Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files. There is a sample NumDays class in a text file for you to use as a base.
arrow_forward
@Build ER diagram
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
Project 2 statement
ANSWER IN SINGLE FILE JAVAPlease read this entire statement carefully before you start doing anything…
This project involves implementing a simple university personnel management program. The program contains three kinds of objects: Staff, student and faculty. For each object, the program stores relevant information such as university ID, name, etc. Different information is stored depending on the type of the object. For example, a student has a GPA, a faculty has a title and department (professor, mathematics).For each of any class data member, your program must include the getters and the setters, and each class must include at least two constructors. The goal of this Project is to demonstrate the use of inheritance, abstract classes, abstract methods, and method overriding.
For a student, we need a:
full name
id
gpa
Number of credit hours currently taken
For a faculty, we need a:
full name
id
department (mathematics, engineering or english)
Rank (professor or…
arrow_forward
Test cases should passed otherwise dislike. Please code should be complete.
arrow_forward
C++ Visual Studio 2019
Instructions
Complete #1 & #2. Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files. Please note: the deleteNode needs to initialize the *nodePtr and the *previousNode. The code to do this can be copied from here: ListNode *nodePtr, *previousNode = nullptr;
arrow_forward
me
words
Insert
Chapter 8 example.docx-Word
View
Review
Design
Tell me what you want to do...
Layout
Mailings
References
Class A:
Int data1, data2
A(int d1,int d2)// initialize data1, data2
Int Add() // adds two numbers: data1, data2
0
Class B:
Data3
Int AddFromB(int d1,int d2, int d3)// adds three numbers {
Super(d1, d2)
Int s=Add()
Int sb=s+d3}
Suppose you have a class called A which have two integer
data(data1, data2) and a method Add() which returns
sammation of data1and data2.
Another class B has an integer data3 and a method AddFromB()
which adds data3 with the returned result of Add().
Now implement the above scenario and show the summation of
three integer numbers.
Ix
Sign in
arrow_forward
Computer Science
JAVASCRIPT .xlsx parser
I need to write a public class that reads an .xlsx file and returns an array of data in javascript. The array would be all of the data inside of the file.
The file itself is going to be inside of a folder(downloadedFIles) inside of my project. So the public class will need to account for that.
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
Task 1: Planning and Passengers
For this task we will be creating an overview of the classes in our system using
the Unified Modeling Language (UML) Class Diagram.
IMPORTANT: When submitting this question, you must submit it as a Portable
Network Graphics (PNG) file.
Below is a list of tools for drawing UML diagrams, but you are free to use any
program of your choosing:
. Google Drawings (https://docs.google.com/drawings/)
. Plant UML (https://plantuml.com/)
• Inkscape (https://inkscape.org/)
• Visual Paradigm (https://online.visual-paradigm.com/)
You may use any tool you wish as long as your diagram follows the UML
conventions and is in the correct format (PNG).
Instructions IMPORTANT: Unless otherwise stated, all attributes should be
private or protected. You may decide for yourself whether an attribute should
be private or protected.
Draw the UML class diagrams for the following classes:
1. An abstract Java class called Person that has the following attributes:
a String called…
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
use windows form app
arrow_forward
Exception handling and File I/O coding intellj
Exercise 3.
File I/O Please create a file and add the following line: 1,5,7,9,13,58,70
Exercise 4,
Assuming you have a file on your laptop, and it has the following: John,23 Please create a Person object from your main method by reading the file. You have to create Person class (String name, int age) Please read the file and show the sum of all the numbers.
arrow_forward
Java OOP
PLEASE DO IT URGENT
A social networking website hires you to meet the following requirements:
User can create their profile
User can check for mutual friends
User can add new friends
User can delete friends
Display user’s profile
Solution Guidelines:
Create a class Profile having name, emailId, city , country, friendlist[] ( Keep the fields private)
Profile class will contain following methods:
createProfile(String name , String emailId, String city,
String country): allow user to set his information
addFriends(Profile profile): sends request, if a person
accepts the request add the person object into friendlist[]
Note: Achieve Method Overloading keep the parameters as (Profile profile , String Message) giving Access to user to send request with a personalized message.
removeFriend(Profile profile):can remove a friend from
the friendlist
showFriends(): display the friendlist
search(Profile profile):searches…
arrow_forward
Failures to assert Launch the DebuggerThe Issue: A failed assert often produces a message and terminates the application. This is not very helpful for locating issues. It would be more preferable if a failing assert could launch the debugger.
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
- java programmingarrow_forwardCreate a simple program for a quiz Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: Create a folder named LastName_FirstName (ex. Dahan yoon) in your local Create a new project named LabExer5B. Set the project location to your own 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). 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) Prompt the user that he can answer again if any of the three (3) exceptions is Display the score.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
- 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_forwardProgramming 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_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
- Assignment #1:Dear Students, Please note the following before answer question below:1. Each student should answer all questions saved in word file and upload it on e-learning.2. The assignment must be submitted on time.3. Any Copy/Paste submitted will be graded ZERO.Suppose you have a program to send message to the second activity: The following button on the second activity is to go back to the first activity. The figures below clearly describe this process:Note:The first activity named: SendMessageActivityThe second activity named: BackActivityThe first button method named OnSend()The second button method named: OnBack() Write an android program that does the following:1. Send Message button to move from the 1st activity to the second activity.2. Back button to move back from the 2nd activity to the 1st activityarrow_forwardInstructions: 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_forwardi want you to draw a er model dont give me this draws all tutors answred by it :(i want new one only photosarrow_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 abovearrow_forward..arrow_forwardPython helparrow_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