alues for all fields. Save this class as Apartment.java. b. Write a class named showApartment that instantiates an apartment object and a Renter object using the cla
Q: benchmark program to evaluate the performance of a processor spends 80% of its time on floating-poin...
A: According to the Question below the Solution:
Q: f) Create a file randomNumbers.txt and fill the file with 100 random numbers in the range [11,99]. W...
A:
Q: What does a Details view entail?
A: DetailView Class helps in displaying the values or the utility of a single record which is from the ...
Q: how can we read the following txt document and store in a string array in C++. abc efg hello world ...
A: #include<iostream> using namespace std; int main() { string array[5] = {"Abc", "Egf", "H...
Q: f) Create a file randomNumbers.txt and fill the file with 100 random numbers in the range [11,99]. W...
A: Iterate for 100 times Generate random number from 0 to 88 and add 11 to it The result will now betw...
Q: Explain in detail what data security is, as well as the three categories of data ownership and their...
A: The definitions asked are:- Data security The types of data ownership
Q: 1. Fill in the following table with the correct subproblem solutions for the weighted longest common...
A: I have answered this question in step 2.
Q: Suppose we have a virtual address of 26 bits in a byte addressable machine. Page size is 8K bytes. A...
A: Suppose we have a virtual address of 26 bits in a byte addressable machine. Page size is 8K bytes. A...
Q: Denial of Service (DoS) is one type of attack, which of the following action-can perform when it acc...
A: Here in this question we have asked about denial of service attack..and among four option we have to...
Q: In MongoDB, what precisely is a Document?
A: Introduction: In MongoDB, a document is a basic unit or building piece of data.
Q: FDDI networks speeds are faster than modern connections to workstations and servers, but modern inte...
A: FDDI networks speeds are taster than modern connections to workstations and servers, but modem inter...
Q: A Caesar cipher is a simple substitution cipher based on the idea of shifting each letter of the pla...
A: Here is the detailed explanation of the program
Q: Describe the advantages and disadvantages of connectionless protocols in compared to connection-base...
A: Introduction: The same route is used by all packets between the source and the destination. It is no...
Q: What value is printed after the following statements are executed? mylist = ['HELLO'] * 5 print(myli...
A: Given :- What value is printed after the following statements are executed?mylist = [ 'HELLO '] * 5p...
Q: Use any algorithm you like for your Final Project C++. Some examples are: ATM machine Vending M...
A: Object-oriented programming (Oop's): Object-oriented programming (OOPs) is a programming paradigm ce...
Q: . In this java program, explain everyline of this code. Source Code: import java.util.*; public c...
A: Algorithm: 1)This program randomly generates two number between 0 to 4 and assign it to array arr at...
Q: GIS Cartography Question: Briefly describe a hill shade. Find an example of a hill shade map online,...
A:
Q: What is ASCII character code?
A: I have Provided this answer with full description in step-2.
Q: What are the benefits and drawbacks of fiber-to-the-home and fiber-to-the-business networks?
A: Introduction: Fibre to the home refers to the construction and usage of optical fibre from a central...
Q: Problem #1 - Initializing and summing an array using for loops Write a program which creates a one d...
A: As per our company guidelines we are supposed to answer only one question. Kindly repost other quest...
Q: etwork hack that occurred in April 2011. What type of attack was it? Was the success of the attack d...
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: 5. Explain the documents needed for Scope Change Control
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: The reason you purchased a cybercafe internet package (download and upload speeds), as well as the I...
A: Introduction: Individuals and businesses can connect to the Internet through computer terminals, com...
Q: Create an Algorithm Design A number divisible by 2 is considered an even number, while a number whic...
A: Pseudo code is an informal language code, which helps the person who is writing the code or the prog...
Q: How do you make a form in an application that just shows the columns of a single row of a database?
A: Using the Details View control in C#, a form is developed to display the columns of a single row of ...
Q: Compute the CPI, for the sequence below (to the nearest 0.1): Floating Point Operation Graphic Opera...
A:
Q: keyboard to press more when you hold down Value in "Current" tab;
A: The Python interpreter works by loading a source file or reading a line typed at the keyboard, parsi...
Q: You are developing a Linux process that must run in the background with no user interface. The proce...
A: The process is called Daemon
Q: Explain how HDFS and MapReduce are mutually beneficial.
A: Introduction: Hadoop spreads data processing over a cluster of commodity computers and runs on sev...
Q: IN MATLAB SOFTWARE Create the following row vectors S and R. S = 1 3 4 7 11 R = 10 ...
A: Answer: %matlab script for square root of the differenceclcclear allclose allS = [ 1 ; 3 ; 4 ; 7 ; 1...
Q: f) Create a file randomNumbers.txt and fill the file with 100 random numbers in the range [11,99]. W...
A: creating a file in c++ ofstream MyFile("randomNumbers.txt"); wrinting intothe file MyFile << n...
Q: What is the difference between a subsystem and a logical division, and why is it important?
A: Given: What is the distinction between a subsystem and a logical division, and why does it matter?
Q: e following formula
A:
Q: Write a C# program that converts feet to meters. The program sh in three-foot increments and the cor...
A: Note: The program print the equivalent meters of the inputted value along with three increments in t...
Q: What is the result of this statement? True and 8 < 10 or False O Runtime error - parenthesis needed ...
A: Answer b) True For more understanding , I have provided PYTHON CODE along with SCREENSH...
Q: Given that the options for a set of radio buttons within the customOrder web form share the name att...
A: the value of the color option selected by the user in the colorvalue variable by executing the java...
Q: What does the Ubuntu Server Operating System look like, and how does it vary from other server opera...
A: Before comparing the difference between Ubuntu Server from other operating systems, let's show what ...
Q: Q5. Figure below shows an unweighted graph of 6 vertices. Draw a spanning tree for the graph where e...
A: Solution: Que-5)
Q: Write Python program of Shift inverse Power method including the Rayleigh Quotient for the eigenvalu...
A: Power Iterationv(O) = some vector with Ilv(O) II = 1fork=1,2, ...w = AV(k-l ) apply AV(k) = w/l...
Q: Using figure 8.1, what SQL statement will show the biggest salary of the salesman if grouped based o...
A: C. SELECT MAX(SALARY) FROM SALESMAN GROUP BY SALARY HAVING MAX(SALARY) > 6500 ORDER BY SALARY DE...
Q: I nee to store a list of 1000 strings. I will create the list only once and wil not modify ik once I...
A: Ans: I need to store a list of 1000 strings. I will create the list only once and will not modify it...
Q: A CPU has a clock speed of one gigahertz (GHz). The processor's CPI was determined to be 6 cycles pe...
A: Introduction A CPU has a clock speed of one gigahertz (GHz). The processor's CPI was determined to b...
Q: SALESMAN Colunns Data Constrants lerants istatstes ITrogers IFiashback lDeperdendes IDetals İPartons...
A: Use update command to change the commission of salesman. Option b is correct
Q: What is the distinction between NFA and DFA? Explain
A: Difference between NFA and DFA: DFA stands for Deterministic finite automata whereas NFA stands for...
Q: All technicians require the appropriate equipment and experience to evaluate and handle troubleshoot...
A: Lets see the solution in the next steps
Q: 1. Order the following functions by asymptotic order of growth (lowest to highest) | 2n | 3log n |2"...
A: 1) Following are the asymptotic order of growth Constant Function < Logirithmic Function < ...
Q: f) Create a file randomNumbers.txt and fill the file with 100 random numbers in the range [11,99]. W...
A: Create a file randomNumbers. txt and fill the fille with 100 randomnumbers in the range [11,99]. Wri...
Q: What Do You Mean When You Say "Partitioning Operating Systems"? Describe the advantages and disadvan...
A: Question: What Do You Mean When You Say "Partitioning Operating Systems"? Describe the advantages an...
Q: Determine two methods for finishing the identical object, one of which employs a more technologicall...
A: Introduction: Plays are still a tremendous source of entertainment nowadays, but their medieval equi...
Q: What happens if a process calls wait before it has called fork, i.e., it has no children?
A: If a process calls wait before it has called fork then wait() function will return immediately
Create a class named Apartment that has fields for an Apartment number, number of bedrooms, number of bathrooms, lease amount, lease terms, and Renter (use the class you created in Question 1). Include methods to assign and retrieve values for all fields. Save this class as Apartment.java.
b. Write a class named showApartment that instantiates an apartment object
and a Renter object using the class you created in Question 1. Use the following values
for the data fields
Data Fields Values Data Types
First Name Roger String
Last Name Moore String
ID Number 72205 String
Age 30 Integer
Credit Score 725 Integer
Income 60000 double
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images
- Write a program named DemoJobs for Harolds Home Services. The program should instantiate several Job objects and demonstrate their methods. The Job class contains four data fields—description (for example, wash windows), time in hours to complete (for example, 3.5), per-hour rate charged (for example, $25.00), and total fee (hourly rate times hours). Include properties to get and set each field except the total fee—that field will be read-only, and its value is calculated each time either the hourly fee or the number of hours is set. Overload the + operator so that two Jobs can be added. The sum of two Jobs is a new Job containing the descriptions of both original Jobs (joined by and), the sum of the time in hours for the original Jobs, and the average of the hourly rate for the original Jobs. Harold has realized that his method for computing the fee for combined jobs is not fair. For example, consider the following: His fee for painting a house is $100 per hour. If a job takes 10 hours, he earns $1000. His fee for dog walking is $10 per hour. If a job takes 1 hour, he earns $10. If he combines the two jobs and works a total of 11 hours, he earns only the average rate of $55 per hour, or $605. Devise an improved, weighted method for calculating Harolds fees for combined Jobs and include it in the overloaded operator+() method. Write a program named DemoJobs2 that demonstrates all the methods in the class work correctly.Write a program named SalespersonDemo that instantiates objects using classes named Real EstateSalesperson and GirlScout. Demonstrate that each object can use a SalesSpeech() method appropriately. Also, use a MakeSale() method two or three times with each object, and display the final contents of each objects data fields. First, create an abstract class named Salesperson. Fields include first and last names; the Salesperson constructor requires both these values. Include properties for the fields. Include a method that returns a string that holds the Salespersons full name—the first and last names separated by a space. Then perform the following Create two child classes of Salesperson: Real EstateSalesperson and Girl Scout. The Real EstateSalesperson class contains fields for total value sold in dollars and total commission earned (both of which are initialized to 0), and a commission rate field required by the class constructor. The Girl Scout class includes a field to hold the number of boxes of cookies sold, which is initialized to 0. Include properties for every field. Create an interface named ISell able that contains two methods: SalesSpeech() and MakeSale(). In each Real EstateSalesperson and Girl Scout class, implement SalesSpeech() to display an appropriate one- or two-sentence sales speech that the objects of the class could use. In the Real Estatesalesperson class, implement the MakeSale() method to accept an integer dollar value for a house, add the value to the Real EstateSalespersons total value sold, and compute the total commission earned. In the Girl Scout class, implement the MakeSale() method to accept an integer representing the number of boxes of cookies sold and add it to the total field.Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have the form realPart + imaginaryPart * i where i is -1 Write a program to test your class. Use floating-point variables to represent the private data of the class. Provide a constructor that enables an object of this class to be initialized when it is declared. Provide a no-argument constructor with default values in case no initializers are provided. Provide public methods that perform the following operations: a) Add two Complex numbers: The real parts are added together and the imaginary parts are added together. b) Subtract two Complex numbers: The real part of the right operand is subtracted from the real part of the left operand, and the imaginary part of the right operand is sub- tracted from the imaginary part of the left operand. c) Print Complex numbers in the form (a, b), where a is the real part and b is the imaginary part.
- My professor has given me additional information for this question: Create a class named CollegeCourse that includes data fields that hold thedepartment (for example, ENG), the course number (for example, 101), thecredits (for example, 3), and the fee for the course (for example, $360). All of thefields are required as arguments to the constructor, except for the fee, which iscalculated at $120 per credit hour. Include a display() method that displaysthe course data. Create a subclass named LabCourse that adds $50 to the coursefee. Override the parent class display() method to indicate that the course isa lab course and to display all the data. Write an application named UseCoursethat prompts the user for course information. If the user enters a class in any ofthe following departments, create a LabCourse: BIO, CHM, CIS, or PHY. If theuser enters any other department, create a CollegeCourse that does not includethe lab fee. Then display the course data. Save the files as…1. Create a class called Student, with the following attributes/variables:a. studentName (String)b. studentNumber (int)sc. regYear(long)d. faculty(String)e. department(String)2. Add the following methods in Student:a. accessors and mutators for all variablesb. toString methodi. Formulate your toString so that it only shows studentName,studentNumber and faculty3. Create a class called MyFriends, with the following attributes variables:a. studentArray(Student[])4. Add the following methods in MyFriends:a. fillArrayi. Using scanner ask how many students does the user want to inputii. Capture user input for all of his friends(Of course we are assuming all your friends would be similarUWC students, go ask around and meet new friends, alsopreferably not in the same Computer Science department … ifpossible … only if possible)b. maini. Call the fillArray methodii. Count how many Computer Science studentsiii. If half or more students are Computer Science students, thendisplay “You … need more…Write a Java class named PhoneRecord.java that performs the following functions: The class should contain the following data attributes and methods: private String name - The customer's name private String number - The customer's phone number public PhoneRecord(String personName, String phoneNumber) - Constructor get/set Methods - For each data attribute public String toString( ) - Special method to be used when printing a phoneRecord object Thank you so much for your help. Trying to write this class has really been stumping me.
- please use java to answer the following question Design and implement a class named Triangle that extends GeometricObject. The class contains: Three double data fields named side1, side2, and side3 with default values 1.0 to denote three sides of the triangle. A no-arg constructor that creates a default triangle. A constructor that creates a triangle with the specified side1, side2, and side3. The accessor methods for all three data fields. A method named getPerimeter() that returns the perimeter of this triangle. A method named toString() that returns a string description for the triangle. The toString() method is implemented as follows: return "Triangle: side1 = " + side1 + " side2 = " + side2 + " side3 = " + side3; Write a test program that prompts the user to enter three sides of the triangle, a color, and a boolean value to indicate whether the triangle is filled. The program should create a Triangle object with these sides and set the color and filled properties…Java question please Create a class called Account that has the following attributes: Account Client - AccountHolder Double - Balance Date - DateCreated Account() Account(Client AccountHolder, Double Balance) getAccountHolder() - Client setAccountHolder(Client) - void getBalance() - Double deposit(Double) - Double withdrawal(Double) - Double getDateCreated() - Date toString() - String compareTo(Account) - Integer equals(Account) - Double Notes: The account holder attribute will link to the Account class that you created in problem 6. Your constructor and overloaded constructor should set the date created to the current date. Your deposit method should add to the balance Your withdrawal method should remove from the balance, as long as there is enough money to withdrawalCreate four (4) Java classes named Color, Model, Car, and CarDemo. In the Color class, create an enum named Color that consists of six (6) colors of your choice. In the Model class, create an enum named Model that contains the following values: SEDAN, SUV, CONVERTIBLE, and HATCHBACK. In the Car class, declare three (3) private fields: int variable named year A Model object named model A Color model named color Add a constructor for the Car class with three (3) parameters: yr (int), model (Model), and color (Color). Inside the constructor, assign yr to year, m to model, and c to color. Add a display( ) method that prints the three (3) Car object's data. In the main method of the CarDemo class, instantiate two (2) Car objects assigning values to them using enumeration values for the models and colors. Example: Car car1 = new Car(2014, Model.SUV, Color.RED); Add two (2) statements to display the data of the two (2) Car objects.
- Create a class named Lease with fields that hold an apartment tenant’s name, apartmentnumber, monthly rent amount, and term of the lease in months. Include a constructor thatinitializes the name to “XXX”, the apartment number to 0, the rent to 1000, and the term to12. Also include methods to get and set each of the fields. Include a nonstatic methodnamed addPetFee() that adds $10 to the monthly rent value and calls a static methodnamed explainPetPolicy() that explains the pet fee. Save the class asLeaseYourlastname.java. Replace ‘Yourlastname’ with your real last name.b) Create a class named TestLease whose main() method declares four Lease objects. Call agetData() method three times. Within the method, prompt a user for values for each fieldfor a Lease, and return a Lease object to the main() method where it is assigned to one ofmain()’s Lease objects. Do not prompt the user for values for the fourth Lease object, but letit continue to hold the default values. Then, in main(), pass…(a) Use java to create a class named Student that includes data fields for the student ID, name, a total quizscore and static for number quiz taken set to 3. In your class, include the following:(Photo 1as below), Create a driver program that tests all constructors and methods. Create 2 objects using thefollowing information: Declare and create an instance of the class using the no-arg constructor. Use the set methods to assign values to the data fields. Display the data field values of this object. Declare and create an instance of the class using the parameterized constructor.Display the data field values of this object. Display the Average Score for each object.Create a class called Complex for performing arithmetic with complex numbers. Complex numbershave the form realPart + imaginaryPart * i where i is √-1Write a java program to test your class. Use floating-point variables to represent the private data of theclass. Provide a constructor that enables an object of this class to be initialized when it is declared.Provide a no-argument constructor with default values in case no initializers are provided. Providepublic methods that perform the following operations:a) Add two Complex numbers: The real parts are added together and the imaginary parts are addedtogether.b) Subtract two Complex numbers: The real part of the right operand is subtracted from the realpart of the left operand, and the imaginary part of the right operand is subtracted from theimaginary part of the left operand.c) Print Complex numbers in the form (a, b), where a is the real part and b is the imaginary part Sample Output: a=(9.5 , 7.7) b)=(1.2 , 3.1) a+b=(10.7 , 10.8)…