Here is the Java code for adding new patients to the program:
package final;
import java.util.*;
import java.io.*;
public class Patient {
String name;
String address;
int age;
String sex;
String illness;
double bill;
int room;
public void read() {
Scanner in = new Scanner(System.in);
System.out.println("Enter patient's name:");
name = in.next();
System.out.println("Enter patient's address:");
address = in.next();
System.out.println("Enter patient's age:");
age = in.nextInt();
System.out.println("Enter patient's sex:");
sex = in.next();
System.out.println("Enter patient's illness:");
illness = in.next();
System.out.println("Enter patient's bill:");
bill = in.nextDouble();
System.out.println("Enter patient's room number:");
room = in.nextInt();
}
public void write() throws IOException {
FileWriter file = new FileWriter("patients.txt", true);
PrintWriter writer = new PrintWriter(file);
writer.println("Name: " + name);
writer.println("Address: " + address);
writer.println("Age: " + age);
writer.println("Sex: " + sex);
writer.println("Illness: " + illness);
writer.println("Bill: " + bill);
writer.println("Room number: " + room);
writer.close();
file.close();
}
public void display() throws IOException {
FileReader file = new FileReader("patients.txt");
BufferedReader reader = new BufferedReader(file);
String line = null;
while((line = reader.readLine()) != null) {
System.out.println(line);
}
reader.close();
file.close();
}
}
In the Hospital Management System, various functions are used for different activities:
Menu(): This function displays the menu screen that allows users to perform different activities mentioned below. It is the default method to be executed.Add new patient record(): This function is used to register a new patient. It collects details such as name, address, age, sex, disease description, bill, and room number, and saves them.View(): This function displays all the information about a specific patient based on the patient number.Edit(): This function is used to modify a patient's details.Transact(): This function is used to pay any outstanding bill for an individual.Erase(): This function is used to delete a patient's details.Output file: This function is used to save the data in a file.The above code includes three functions: `read()`, `write()`, and `display()`. The read() function collects the patient's details, the `write()` function saves the details in a file, and the display() function displays the details of the patients from the file.
The package statement package final; indicates that the class is kept in the final package. The Patient class is defined with three functions: `read()`, `write()`, and `display()`. To read from and write to a file, the FileReader and FileWriter classes are used, and the patient details are stored in the `patients.txt` file. The code is developed using the Java programming language instead of C++.
Learn more about Java: https://brainly.com/question/25458754
#SPJ11
what type of plan shows the layout for portable toilets, dumpsters, and on-site parking areas be shown?
The type of plan that shows the layout for portable toilets, dumpsters, and on-site parking areas is called a site plan or a site map.
This type of plan includes details of the entire site, including the location and arrangement of all structures, equipment, and features such as landscaping, parking areas, and waste management facilities. Site plans are often required by local zoning and building regulations and may need to be approved by local authorities before construction or events can take place. The details provided in a site plan can help ensure that the site is safe, accessible, and functional for its intended use, while also minimizing potential impacts on neighboring properties and the environment.
learn more about layout here:
https://brainly.com/question/32076998
#SPJ11
Online shopping cart (Part 1) (1) Create two files to submit: • Item ToPurchase.java -Class definition • Shopping CartPrinter.java - Contains main() method Build the ItemToPurchase class with the following specifications: . Private fields o String itemName - Initialized in default constructor to "none" o int itemPrice - Initialized in default constructor to O int itemQuantity - Initialized in default constructor to O • Default constructor • Public member methods (mutators & accessors) setName() & getName() (4 pts) setPrice() & getPrice() (4 pts) setQuantity & getQuantity0 (4 pts) (2) In main, prompt the user for two items and create two objects of the ItemToPurchase class. Before prompting for the second item, call scnr.nextLine(); to allow the user to input a new string. (2 pts) (RECALL in our previous demo, we use scnr.nextLine() to take the special character \n and add scnr.nextLine() to take the next input) Ex: (note there should be no whitespace at the end) Item 1 Enter the item name: Chocolate Chips Enter the item price: 3 Enter the item quantity:
You need to create two files, define a class ItemToPurchase, create objects of that class, and prompt the user to input the information for two items in the main method of the ShoppingCartPrinter class.
To complete this task, you need to create two files, ItemToPurchase.java and ShoppingCartPrinter.java. ItemToPurchase is a class that should have private fields such as itemName, itemPrice, and itemQuantity, which are initialized to "none," 0, and 0, respectively, in the default constructor.
It should also have public member methods that are responsible for setting and getting the values of each field, including setName(), getName(), setPrice(), getPrice(), setQuantity(), and getQuantity().
In the main method of ShoppingCartPrinter.java, you need to prompt the user to enter two items by asking for the item name, price, and quantity for each item. After taking the input for the first item, you should use scnr.nextLine() to avoid taking the newline character. Then, create two objects of the ItemToPurchase class, one for each item.
To know more about default constructor visit:
brainly.com/question/31053149
#SPJ11
How does data mining help interactive marketing for a business?
By predicting which customers are lively to go to a competitor
By identifying which prospects should be included in a mailing list
By revealing the difference between a typical customer this month and last
By predicting what each individual accessing a website is most likely interested in seeing
The way in which data mining helps interactive marketing for a business firm is: D. By predicting what each individual accessing a website is most likely interested in seeing.
What is data mining?Data mining can be defined as a strategic process that typically involves extracting and analyzing data that are contained in large databases, especially through the use of specialized software to generate new information.
In this context, a business firm can adopt the use of data mining to enhance and facilitate interactive marketing by creating a process that can effectively and efficiently predict what each individual (customer) accessing their website is most likely interested in seeing.
Read more on a website here: https://brainly.com/question/26324021
1.
Explain why an n-type semiconductor material is
electrically neutral and not negatively charged.
Answer:
It is important because the donor introduces a free electron to the conduction band while leaving behind a fixed positively charged ion, thus maintaining the overall charge neutrality.
Within an air power cycle, an isentropic compressor operates between pressures of 120 kPa and 900 kPa. If the temperature at the compressor inlet is 394 K, then: (a) What is the temperature at the outlet? K (b) What is the work required by this compressor? kJkg NOTE: Do not assume constant specific heats. Rather, perform an "exact analysis"
(a) The temperature at the outlet is approximately 716.7 K,
(b) The work required by the compressor is approximately 324.6 kJ/kg.
How to solve
To solve this problem, we'll use the isentropic relation and the ideal gas equation:
(a) T2 = T1 * (P2/P1)^((k-1)/k)
We would put the precise values for each of them and solve below
T2 = 394 * (900/120)^((1.4-1)/1.4) ≈ 716.7 K
(b) Compressor work (Wc) can be calculated using the equation:
Wc = cp * (T2 - T1)
where cp (specific heat at constant pressure) for air is approximately 1005 J/kgK.
Wc = 1005 * (716.7 - 394) ≈ 324575 J/kg ≈ 324.6 kJ/kg
So, (a) the temperature at the outlet is approximately 716.7 K, and (b) the work required by the compressor is approximately 324.6 kJ/kg.
Read more about temperature here:
https://brainly.com/question/27944554
#SPJ1
Hey guys can anyone list chemical engineering advancement that has been discovered within the past 20 years
Calculate the compression resistance of a compound column consisting of UC-305x305x198 with one cover plate
of 350mm x 20mm on each flange and having a length of 5m. assume that bottom of column is fixed and top is
pinned in both x & y axis?
Answer:
350×305π{^ not sure my answer please follow me
here you can find my "english language" practice test. thanks in advance to solve that.
***Rewrite the sentences correct form of either infinitive or ing form without losing the meaning of the given sentences.
1) No matter how hard you tried, you will not convince Sarah. -Its no use Sarah.
2) The kids cant wait to go on holiday. (look forward to) -The kids on holiday.
3) He decided he would go on a business trip in september rather than in may. (choose) - He on a business trip in september.
4)They made me study hard when i was at university. I was at university.
5) I went to my local bank about getting a loan. (view) I went to my local bank a loan.
1) No matter how hard you try, Sarah will not be persuaded.
2) The kids are excited to go on vacation.
3. He opted to travel for business in September as opposed to May.
4) They pushed me work hard on my studies while I was in college.
5) I went to my neighbourhood bank to ask about obtaining a loan.
Note: Number 5's corrected sentence was puzzling. I assumed that asking about loans was the intended meaning. If you would like more information so that I can understand what you meant, please let me know.
learn more about persuaded here :
https://brainly.com/question/29744900
#SPJ11
Which of the following refers to the process in which engineers complete and repeat a sequence of steps to come closer to the project goal?
The process in question is referred to as the iterative design process. Engineers utilize this method by completing and repeating a sequence of steps in order to continually improve and refine their designs as they work towards achieving the project goal. This approach allows for flexibility and adaptability in the design process, as engineers can make adjustments and modifications based on feedback and testing, ultimately leading to a more successful outcome.
If you're carrying a load that extends beyond the sides of your vehicle, you don't need to clearly mark it unless it extends more than _____ beyond the rear of the vehicle.
Answer:
If you're carrying a load that extends beyond the sides of your vehicle, you don't need to clearly mark it unless it extends more than four feet beyond the rear of the vehicle.
Can space debris take out a whole state
trevor moves a magnetic toy train away from a magnet that cannot move. what happens to the potential energy in the system of magnets during the movement?
Answer:a
Ieieksdjd snsnsnsnsksks
Television is a technological development that occurred during the . renaissance renaissance industrial age industrial age paleolithic age paleolithic age information age
Television is a technological development that occurred during the industrial age.
Is a television a technology?The technology of the use of television is known to be one that has changed since its industrial days via the use of a mechanical system which is said to be invented by a man named Paul Gottlieb Nipkow in the year 1884.
Therefore, one can say that Television is a technological development that occurred during the industrial age.
Learn more about Television from
https://brainly.com/question/871526
#SPJ1
Television is a technological development that occurred during the industrial age.
What is Industrial Age?The Industrial Age can be regarded as the period of history which there is a change from the usage of hand tools to power-driven machines which occurred around 1760.
Around this period there was turn around in economic and social organization and some items such as Television, as well as other engines were made.
learn more about Industrial Age at: https://brainly.com/question/1078028
#SPJ1
1.How would you convince your management to allow your project team to incorporate quality reviews into the project life cycle?2.What kinds of quality review models (e.g., walkthrough, inspection, other) would you implement?
To convince management to incorporate quality reviews into the project life cycle, it is important to emphasize the benefits of quality reviews in improving project outcomes and reducing risks
1. Convincing management: When advocating for incorporating quality reviews into the project life cycle, it is crucial to highlight the advantages they bring. Quality reviews help identify defects and errors early in the project, leading to improved quality, reduced rework, and enhanced customer satisfaction. They provide an opportunity for team collaboration, knowledge sharing, and continuous improvement. By emphasizing the potential cost savings and improved project outcomes resulting from quality reviews, management can be persuaded of their value. Presenting case studies or success stories from other projects that have benefited from quality reviews can also help support the argument.
2. Quality review models: The choice of quality review models depends on various factors such as project complexity, team size, and available resources. Some common quality review models include walkthroughs, inspections, and peer reviews. Walkthroughs involve a group of team members reviewing project deliverables together, discussing their content, and identifying potential issues. Inspections are more formal and structured, with a designated moderator leading the review process and following predefined checklists or standards. Peer reviews involve team members reviewing each other's work, promoting knowledge sharing and accountability. The specific models to implement can be determined by considering the project's specific needs, available resources, and the team's preferences and expertise. It is also important to establish clear guidelines, roles, and responsibilities for conducting the reviews and ensuring that the feedback and findings from the reviews are appropriately addressed and incorporated into the project.
Learn more about peer reviews here:
https://brainly.com/question/32154509
#SPJ11
A mother claims that she loves her only son. One day the son commits murder to support his addiction. The son confides in the mother about the murder he committed.Eventually, the son was caught and was sued in court. The mother when called to testify, she lied to the court stating that her son could not have committed such crime. When her friend asked why did she do it, she said that she did it out of love for her only son.According to the moral principle of Immanuel Kant, is the action of the mother justified or morally right to lie in court for the sake of love? Defend your discussion with the principles of Kant and Deontology.
Based on the use of the moral principle of Immanuel Kant and deontology, the way that the mother lie in court for the sake of love is one that is not morally justified or right.
What is the claims?Kant's moral philosophy is said to be one that capitalizes on the principle of universalizability, and it is one that states that we as humans need to only act based to principles that we can overtime will to be universal laws.
In conclusion, I can say that the action of the mother when she lie in court for the sake of love is very wrong and morally justified or right when viewed in Kant's moral philosophy or deontology.
Learn more about claims from
https://brainly.com/question/2748145
#SPJ1
the most perfect method of scavenging??
The "most perfect" method of scavenging will depend on the specific materials or resources being scavenged, as well as the context in which the scavenging is occurring.
What is scavenging?Scavenging refers to the process of collecting and using materials or resources that have been discarded or abandoned by others.
Therefore, In knowing what you're looking for: Before you start scavenging, it's important to have a clear idea of the materials or resources you need and where you might be able to find them. This will help you focus your search and make it more efficient.
Learn more about scavenging from
https://brainly.com/question/14365386
#SPJ1
show, schematically, stress-strain behavior of a non-linear elastic and a non-linear non-elastic materials depicting loading and unloading paths
Non-linear elastic materials exhibit a non-linear relationship between stress and strain, meaning that the stress-strain behavior deviates from Hooke's law.
Non-linear non-elastic materials, on the other hand, exhibit irreversible deformation and do not return to their original shape after unloading.
To schematically show the stress-strain behavior of these materials, we can use a stress-strain curve. The x-axis represents strain, while the y-axis represents stress. The curve can be divided into loading and unloading paths.
For a non-linear elastic material, the loading path will have a steep slope at low strains, which then gradually decreases until it reaches a plateau. The plateau is called the yield point, beyond which the material deforms significantly under constant stress. When the stress is removed, the unloading path follows a slightly different curve, but ultimately returns to the same strain value as before.
For a non-linear non-elastic material, the loading path will also have a steep slope at low strains, but it will not reach a plateau. Instead, the curve will continue to increase until it reaches a maximum stress value, beyond which the material fails and breaks. When the stress is removed, the unloading path will not follow the same curve as the loading path, but will instead follow a different path that intersects the loading path at a lower stress value.
Overall, the stress-strain behavior of a non-linear elastic material is reversible, while the stress-strain behavior of a non-linear non-elastic material is irreversible.
To know more about strain visit
https://brainly.com/question/14770877
#SPJ11
Technician A says that some vehicle makers do NOT apply undercoating to the floor pan. Technician B says that some vehicle makers do NOT apply anti-corrosion compound to interior cavities. Who is right?
Answer:
Explanation:
Both technicians are right
An infinitesimal lossless dipole of length L is positioned along the x-axis of the coordinate system
rectangular (x,y,z) and symmetrically about the origin and excited by a current of complex amplitude C. For
observations in the far field region, determine:
(i) The electromagnetic field radiated by the dipole;
(ii) The average power density;
(iii) The radiation intensity;
(iv) A relationship between the radiation and input resistances of the dipole.
(i) The electromagnetic field radiated by the dipole: An infinitesimal lossless dipole of length L is positioned along the x-axis of the coordinate system rectangular (x,y,z) and symmetrically about the origin and excited by a current of complex amplitude C.
The vector potential due to the current distribution of the current element is given by;
A(\vec{r},t) = -\frac{j\mu _0}{4\pi}\frac{e^{-jkr}}{r}(\vec{m}\cdot \vec{r})
The vector potential is given as the product of a factor that depends only on the geometry of the source and a function that depends on the time and the observation point.(ii) The average power density: The power radiated by a dipole of length L driven by an alternating current I is given by;
P_{rad} = \frac{1}{2}\eta I^2L^2\left(\frac{\omega}{c}\right)^4
For an isotropic radiator, the total power radiated is uniformly distributed over the surface of a sphere of radius r in the far field, the intensity of the radiation at any point is the power received per unit area per unit solid angle. The average power density at the observation point in the far field of a lossless dipole is given by:
\overline{P_{rad}} = \frac{P_{rad}}{4\pi r^2}
(iii) The radiation intensity: The radiation intensity of a small electric dipole moment m is given by;
U = \frac{\eta I^2L^2}{12\pi r^2}sin^2\theta
where L is the length of the dipole, I is the current flowing through the dipole, θ is the angle between the line joining the point of observation to the dipole and the dipole axis, r is the distance between the dipole and the point of observation and \eta = \sqrt{\frac{\mu _0}{\epsilon _0}} is the wave impedance of free space.(iv) A relationship between the radiation and input resistances of the dipole:
The input impedance of the half-wave dipole is given by:
Z_{in} = \frac{73 + j42.5}{2\pi fL} \Omega
The radiation resistance of the half-wave dipole is given by:
R_{rad} = \frac{2\pi ^2 f^2L^2}{3\lambda ^2} \Omega .
Hence, the relationship between radiation and input resistance is given by:
R_{rad} = \frac{3}{4}Z_{in}
To know more about electromagnetic field visit:
https://brainly.com/question/32250541
#SPJ11
The two structural members, one of which is in tension and the other in compression, exert the indicated forces on joint o. determine the magnitude r of the resultant r of the two forces and the angle θ which r makes with the positive x axis (measured counterclockwise from the x axis).
Underground water is to be pumped by a 78% efficient 5- kW submerged pump to a pool whose free surface is 30 m above the underground water level. The diameter of the pipe is 7 cm on the intake side and 5 cm on the discharge side. Determine (a) the maximum flow rate of water (5-point) and (b) the pressure difference across the pump (5-point). Assume the elevation difference between the pump inlet and the outlet and the effect of the kinetic energy correction factors to be negligible
Answer:
a) The maximum flowrate of the pump is approximately 13,305.22 cm³/s
b) The pressure difference across the pump is approximately 293.118 kPa
Explanation:
The efficiency of the pump = 78%
The power of the pump = 5 -kW
The height of the pool above the underground water, h = 30 m
The diameter of the pipe on the intake side = 7 cm
The diameter of the pipe on the discharge side = 5 cm
a) The maximum flowrate of the pump is given as follows;
\(P = \dfrac{Q \cdot \rho \cdot g\cdot h}{\eta_t}\)
Where;
P = The power of the pump
Q = The flowrate of the pump
ρ = The density of the fluid = 997 kg/m³
h = The head of the pump = 30 m
g = The acceleration due to gravity ≈ 9.8 m/s²
\(\eta_t\) = The efficiency of the pump = 78%
\(\therefore Q_{max} = \dfrac{P \cdot \eta_t}{\rho \cdot g\cdot h}\)
\(Q_{max}\) = 5,000 × 0.78/(997 × 9.8 × 30) ≈ 0.0133 m³/s
The maximum flowrate of the pump \(Q_{max}\) ≈ 0.013305 m³/s = 13,305.22 cm³/s
b) The pressure difference across the pump, ΔP = ρ·g·h
∴ ΔP = 997 kg/m³ × 9.8 m/s² × 30 m = 293.118 kPa
The pressure difference across the pump, ΔP ≈ 293.118 kPa
A 50 Hz, pad-mount three-phase transformer for an off-shore wind turbine must be designed to handle 7.2MVA and have a bank ratio of 600 V−34.5kV, The transformer shall be built using three 50 Hz single-phase transformers. Specify the high and low side voltages, rated power, rated coil currents, and the turns fatio of these transformers if they are to be connected in a Wye-Wye configuration. The transformer bank shall be grounded on the low voltage side. Draw a circuit diagram showing this configuration.
In a Wye-Wye configuration for a 50 Hz, pad-mount three-phase transformer, the high-side voltage is 600 V and the low-side voltage is 34.5 kV.
The rated power of each single-phase transformer is 2.4 MVA. The rated coil current on the high side is approximately 870 A, and on the low side, it is around 26.1 A. The turns ratio of each transformer is 57:1 (approximately).
To achieve the desired configuration, three single-phase transformers are connected in a Wye-Wye configuration. In this configuration, the primary (high-side) windings of the transformers are connected in a Wye (star) arrangement, and the secondary (low-side) windings are also connected in a Wye configuration. The high-side voltage is 600 V, and the low-side voltage is 34.5 kV. Each single-phase transformer is rated for 2.4 MVA, resulting in a total rated power of 7.2 MVA for the three transformers combined. The rated coil current on the high side is approximately 870 A, while on the low side, it is around 26.1 A. The turns ratio of each transformer is approximately 57:1, which ensures the desired voltage transformation between the primary and secondary sides.
Here is a circuit diagram illustrating the Wye-Wye configuration:
Please note that this diagram represents a simplified visualization of the Wye-Wye configuration and does not include all components or connections.
To learn more about configuration
https://brainly.com/question/31562981
#SPJ11
A reservoir rock system located between a depth of 2153m and a depth of
2383m , as the pressure at these depths is 18.200 MPa , 19.643 MPa
respectively the thickness of oil zone 103m, if the density of water is 1060 kg/m3
Determine the oil and gas density. what is the pressure at the depth of 2200m ?
what is the depth at which the pressure is 1900 MPa? Determine the gas-oil and
oil- water contact depth.
The map of the points and polygons of a model laid out in a 2-dimensional space is:
a tile
a UV map
a bitmap
a topography
Which of the following is NOT part of a rack-and-pinion steering system?
a. pitman arm
b. idler arm
c. center link
d. all answers are correct
The one that is not a part of a rack-and-pinion steering system are the pitman arm, idler arm, and center link. The correct option is d. all answers are correct.
What is a rack-and-pinion steering system?Rack and pinion steering employs a gear set to transform the steering wheel's circular motion into the linear motion required to turn the wheels. Tie rods, the shaft, and rack and pinion are the key components of a rack and pinion system.
When the steering wheel is rotated, the shaft transfers the steering wheel's action to the gear. This causes the gear to rotate, which causes the rack to move.
Therefore, the correct option is d. all answers are correct
To learn more about the steering system, refer to the link:
https://brainly.com/question/11210624
#SPJ1
According to a recent study quoted in the textbook, __________________ were the number one skill(s) that college graduates found useful in the business world. Group of answer choices
Answer: According to a recent study quoted in the textbook, communication and interpersonal skills were the number one skill(s) that college graduates found useful in the business world.
Explanation:
Using the charts below, if you knew that a 1 mm diameter copper-nickel alloy wire can withstand a maximum load (before plastic deformation) of 78.54 N, and possesses an electrical resistance of 0.5 Ohms, then what is its length
Answer:
L = 10.32 m
Explanation:
The resistance of a copper-nickel alloy wire is given by the following formula:
\(R = \frac{\rho L}{A}\)
where,
R = Resistance = 0.5 Ω
ρ = resistivity of copper-nickel alloy = 3.8 x 10⁻⁸ Ωm
L = Length of wire = ?
A = cross-sectional area of wire = \(\frac{\pi d^2}{4} = \frac{\pi(1\ x\ 10^{-3}\ m)^2}{4}\) = 7.85 x 10⁻⁷ m²
Therefore,
\(0.5\ \Omega = \frac{(3.8\ x\ 10^{-8}\ \Omega.m)L}{7.85\ x\ 10^{-7}\ m^2}\)
L = 10.32 m
Tech A says that engines in most RWD vehicle are removed from the top. Tech B says that before an engine fails, there are usually warning signs such as dash warning lights indicating low oil pressure, high operating temperature, or abnormal engine noises. Who is correct
Answer: Both A and B
Explanation: because they are both true
It is given that 50 kg/sec of air at 288.2k is iesntropically compressed from 1 to 12 atm. Assuming a calorically perfect gas, determines the exit temperature and the compressor's input power.
The exit temperature is 586.18K and compressor input power is 14973.53kW
Data;
Mass = 50kg/sT = 288.2KP1 = 1atmP2 = 12 atmExit TemperatureThe exit temperature of the gas can be calculated isentropically as
\(\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y}\\ y = 1.4\\ C_p= 1.005 Kj/kg.K\\\)
Let's substitute the values into the formula
\(\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y} \\\frac{T_2}{288.2} = (\frac{12}{1})^\frac{1.4-1}{1.4} \\ T_2 = 586.18K\)
The exit temperature is 586.18K
The Compressor input powerThe compressor input power is calculated as
\(P= mC_p(T_2-T_1)\\P = 50*1.005*(586.18-288.2)\\P= 14973.53kW\)
The compressor input power is 14973.53kW
Learn more on exit temperature and compressor input power here;
https://brainly.com/question/16699941
https://brainly.com/question/10121263
both pulleys are fixed to the shaft
Answer:
go and search it will show you I would send you the link but it wont allow me so just look it up for now