THIS IS IN JAVA When was Jen unemployed? if((year>=2010)&&(year<=2014)){ // Jen employed at Regal Cinemas ... } else if ((year >= 2018)) { // Jen employed at AMC Cinemas ... } else { // Unemployed ... }
Q: please make it run using static System.Console; class GreenvilleRevenue { static void Main()…
A: Given Code:- using static System.Console; class GreenvilleRevenue { static void Main() {…
Q: Suppose you are creating a fantasy role-playing game. In this game we have four different types of…
A: #include <iostream>#include <cstdlib>#include <string>#include <ctime>using…
Q: rranged in rows and can be configured in different classes which have more or fewer seats per row…
A: the code is a given below :
Q: Description: In a hypothetical class, students take two midterms and an optional final. If a student…
A: Here's the code for a function that takes the midterm1 score, midterm2 score, and comprehensive…
Q: Design and implement a way of fieding the minimum two prices, sum up them, and anplay. While finding…
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: How can I make a test in JUnit for this setter and getter?
A: You can include both setter and getter in single test but it was not a very good practice to be…
Q: Create an Object Oriented Programming using JAVA Class & Object with Constructor: Enter three (3)…
A: public class Product{ //declare instance variables public String name; public double…
Q: les: dayOfWeek (1) -> "Sunday" dayOfWeek (4) -> "Wednesday" Your Answer: 1 public String dayOfWeek…
A: Here is the code in Java:
Q: Task – 8 Implement the design of the FootBallTeam and the CricketTeam classes that inherit from Team…
A: Please upvote me, I am providing you the correct answer below. Please please I need it badly.…
Q: Consider the following class and answer questions after this class #include using…
A: Note: The answers of the first three subparts are shown below. Please repost the remaining subpart…
Q: It is required to develop an application in Java to perform some operations to store information…
A: Please check the step 2 for solution
Q: A Stocklnvestment object would be used in computer applications that help a user keep track of the…
A: Below are the answers for both the questions:
Q: Type two statements that use rand() to print 2 random integers between (and including) 100 and 149.…
A: Algorithm: START Take a seed value from the user. Set the seed with the input seed value. Set an…
Q: dayOfWeek (1) -> "Sunday" dayOfWeek (4) -> "Wednesday" Your Answer: 1 public String dayOfWeek (int…
A: Check if dayNum is in range of 1-7 or not Then return String accordingly
Q: Q1: There are common attributes and methods between passengers and drivers. What is the best choice…
A: The national railway company is seeking to develop a simple application to manage trips and…
Q: Which XXX completes the power function? public class ExponentMethod { public static double…
A: The program is written in java.
Q: Goals Practice utility classes and static methods Description Create an application for a party…
A: Algorithm Store class: This code implements a Store class that processes orders for ribbon, candy,…
Q: This question involves the design of a class that will be used to produce practice problems. The…
A: In this question we have to write a code in java program MultPractice, which implements the…
Q: Design an ER diagram to capture the above requirements. State any assumptions you have that affects…
A: In the above question, you are asked to design an Entity-Relationship (ER) diagram for a soccer…
Q: 2) write if the current number of shoppers is greater than or equal to the number leaving then the…
A: Initialization:Create a class BookClub with private instance variables: capacity and occupancy (both…
Q: dayOfWeek (1) -> "Sunday" dayOfWeek (4) -> "Wednesday" Your Answer: 1 public String dayOfWeek (int…
A: Algorithm: 1. Take input 2. Check for correct case. 3. If no case matched, print invalid 4. Else…
Q: JAVA: Your school needs a program to keep information on different courses. For each course the…
A: Primary Class: Courses Secondary Class: Department, Student Department and Student class will…
Q: Garbage collector works in following condition: 1. Employee john = new Employee() john=null; 2.…
A: Program approach: we use two methods finalize() method and gc() method. finalize() method is invoked…
Q: e are the rules of N x N Tic-Tac-Toe game: • Players take turns placing characters into empty…
A: Here,Step to build Tic-Tac-Toe game using java: Import packages Initialize User Interface Adding…
Q: This exercise will be about processing a collection of bank transactions using an iterator. A…
A: Here is the C++ code for the Banking management system project. Every section is properly sectioned.…
Q: Question 47 Which XXX calls the alternative constructor? public class Student { private double…
A: Answer: Option 4 = this(0.0)
Q: Consider the following code segment and answer questions 14 and 15. class Point { public: Point…
A: A constructor is a unique method or function used in object-oriented programming that is invoked…
Q: K Chapter 4 Project - new Fall 10-21-20... Project Name: Chpt4_Project Class Name: Chpt4_Project…
A: Java program that accepts names of members on a tug of war team, computes their total weight, and…
Q: ave question this four times. Make a code
A: I have the code below:
Q: 1.predict future precipitation pattern for one month: oneMonthGenerator 2.find the number of wet or…
A: We need to find out the future precipitation pattern using the transition probability tables for…
Q: int findLargestNumber (int numOne, int numTwo, int numThree) { int largestNo; if { (numOne>numTwo) }…
A: Algorithm: 1. Start 2. Input A,B,C 3. If (A>B) and (A>C) then print “A is greater”.…
Q: GTSandwich.java 1. Create a class called GTSandwich 2. GTSandwich has 7 private instance variables:…
A: Algorithm:Define a class named GTSandwich with private instance variables for bread, meat, extras,…
Q: Assume that Holder, Account and Rate classes are predefined. Analyse the Java code. Note: you are…
A: Below i have analyzed the java code and provided the comment to the given program
Q: Assume Furniture is an abstract class having an abstract method called calculatePrice, The method…
A: Furniture is an abstract class and having an abstract method inside it with name calculatePrice.…
Q: You are asked to develop a system to solve a real-world problem. Make sure your system uses…
A: Loan Class: package loanSystem;//Abstract Classpublic abstract class Loan { //fields private…
Q: PYTHON SHORT CODE # Define classes based on given instance outputs s_1 =…
A: Given: PYTHON SHORT CODE # Define classes based on given instance outputss_1 =…
Q: What is the name of parameter used in setPrice?
A: We are given a code and in a function declaration we are asked which one is the function parameter?
Q: mplement the code according to the giving class diagram [hint: you need to calculate WRT and HRT…
A: ApproachTo calculate WRT and HRT percentages, we use if else-if statements in the function…
Q: App Exercise - Workout Functions Note These exercises reinforce Swift concepts in the context of a…
A: Here is the answer with explanation:-
Q: Write an employee payroll program that uses polymorphism to calculate and print the weekly payroll…
A: SOLUTION- I have solved this problem in Java code with comments and screenshot for easy…
Q: I NEED JAVASCIPT SOLUTION PLEASE Task An ATM only has 100, 50 and 20 dollar bills (USD)…
A: Step-1: StartStep-2: Declare a variable amount and take input from userStep-3: Call function…
Q: Create class Employee. • Use static variable an nualTaxRate to store the annual tax rate for all…
A: Create a class Employee and initialize the variable that is specified in the prompt with the access…
Q: In example B are the classes that scott teaches referring the same object as the classes…
A: Yes is correct answer
Q: Q4. Implement the following Class. CommissionEmployee -gTAssSalesvalur double -commisionRate Value…
A:
Q: A store provides 10 percent discount on all items with a price of at least $100. No discount is…
A: I have given an answer in step 2.
THIS IS IN JAVA
When was Jen unemployed?
// Jen employed at Regal Cinemas
...
}
else if ((year >= 2018)) {
// Jen employed at AMC Cinemas
...
}
else {
// Unemployed
...
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- 2- Consider the following program:public class Product{ private int price;public void setPrice(int theprice){price = thePrice;}}public class SpecialProduct extends Item{ private int discount;public void setDiscount(int theDiscount){discount = theDiscount;}}public class Main{public static void main(String[]args){SpecialProduct product = new SpecialProduct();}}Which of the following compiles without a problem? Why?a. product.discount = 20;b. product.setDiscount(20);c. product.setPrice(50);JavaObject-oriented programmingcreate a program that manages the production of a company. The production of each of the months of the year 2021 is saved, the average production of the year is also stored.Include a method to display all company information.Include at least three public or private type attributes. If they are private don't forget to include the getter and setter methods ONLY for private attributes.Include both default and parameterized constructors.Your program must allowShow all company dataRequest company dataShow the name of the month that had the highest production.Show the name of all the months with production less than the annual average.Identify the methods that are of the class and those that are of the main program.DO NOT forget that attributes, methods, classes, objects and messages are written in English.The MIN and MAX methods must be part of the main program. NOT of the class
- 1) Through BlueJ, the class must define a method called isSpace that allows the book club staff to determine whether there is enough capacity for a group to attend. This method must take a single integer parameter representing the size of the group, and return a boolean result. The method must work as follows: If the value of the parameter is less-than or equal-to 0 then the method must return false. This case has priority over those following. If the value of the parameter is less-than or equal-to the space left in the book club (use the capacity and occupancy values in the to work this out) then the method must return true. Otherwise (i.e., if there is not space in the book club for the whole group) then the method must return false. 2) This method must not change the state of the BookClub object. In other words, both the current number of occupants and the capacity of the club must be exactly the same after it is called as it was before (Note that the return type of this method…Hr, Min, Sec Constructors to handle: default, (4, 15, 6), (1,30), (14), (clock1) Overload <> ++,, >=, ==, != Get and Set methods. Write a tester program that creates 2 clocks(Input from the user). The first clock will represent the real time and one will represent your alarm clock. Do a loop that will continue to add 1 second to the current time and stop when it reaches the alarm clock time. Display the time each second on the screen. You can use system("CLS"); to clear the screen each time so it looks like it is overwriting the current time. #include void main() { system("cls"); }What is displayed by the following code segment? public class Book { private double cost, retail; private boolean fiction; private void setRetail(){ if(fiction) } } retail = cost * 2.0; else } retail = cost public Book (double c, boolean f){ cost = c; * 1.5; fiction f; retail = cost; public double getRetail(){ setRetail(); return retail; public static void main(String[] args) { Book myBook = new Book (10.0, true); System.out.println(myBook.getRetail());
- // This class discounts prices by 10% public class DebugFour4 { public static void main(String args[]) { final double DISCOUNT_RATE = 0.90; int price = 100; double price2 = 100.00; tenPercentOff(price DISCOUNT_RATE); tenPercentOff(price2 DISCOUNT_RATE); } public static void tenPercentOff(int p, final double DISCOUNT_RATE) { double newPrice = p * DISCOUNT_RATE; System.out.println("Ten percent off " + p); System.out.println(" New price is " + newPrice); } public static void tenPercentOff(double p, final double DISCOUNT_RATE) { double newPrice = p * DISCOUNT_RATE; System.out.println"Ten percent off " + p); System.out.println(" New price is " + newprice); } }Incorrect Question 4 Consider public class Species { } // fields private String name; private int population; private double growthRate; // constructor public Species () { } name = "No Name Yet"; population = 0; growthRate = 33.3; Which of the following is the best setter method for the population instance variable? public boolean setPopulation(int newPopulation) { } if (newPopulation>= 0) { } population = newPopulation; return false; } return true; public public void setPopulation (int newPopulation) if (newPopulation>= 0) { } population newPopulation; public void setPopulation (int newPopulation) { population } = newPopulation;IN JAVA Cartesian Item Programming Depiction of the test: The Cartesian result of two arrangements of numbers An and B is characterized as the arrangement, all things considered (a,b) where an is an individual from An and b is an individual from B. It is frequently addressed by the image A x B and is alluded to as the Cartesian item since it starts in Descartes' meaning of logical calculation. The Cartesian result of two arrangements of genuine numbers is as requested sets. for example An equivalents [1, 2, 3]. B approaches [4, 5]. C = [(1, 4), (1, 5), (2,4), (2.5), (3,4), (3,5)] is the Cartesian item. Presently, given a facilitate tuple (i,j), where I signifies A[i] and j indicates B[j], and knowing A, B, develop a capacity that profits the file of a part in Cartesian item C as per (i,j) Introduction code: Primary public class /** * Repeat over the information lines individually. */ IOException is tossed by open static void main(String[] args). new…
- How can I express the following situation in Java programming? Orcs, Hobbits, and Tom Bombadil We have n-1 Orcs and n Hobbits who want to cross a river. We also have Tom Bombadil who wants to cross as well. Only Hobbits and Tom Bombadil can row the boat (don’t ask me why!) At all times, the number of Hobbits on either side of the river must be greater or equal the number of Orcs on that side (unless there are no Hobbits on that side), or the Hobbits will be killed by the Orcs! If the boat holds 2, with n=4 or more, the problem has no solution. If the boat can hold 3, then up to n=5 can be solved. If the boat can hold 4, any number (n) Hobbits can cross. So -- if n = 1,2 or 3 - use a boat of size 2. If n = 4 or 5 - use a boat of size 3. If n > 5 use a boat of size 4. If n <0 invalid input if n = 0 no output.In JAVATressetteYou are given the types: type colore = Spade | Coppa | Bastoni | Denari ;; type valore = Ace | Two | Three | Four | Five | Six |Seven | Jack | Knight | King ;; type mazzo = Null | Carta of carta and carta ={ c : colore ; v: valore ; mutable tl : mazzo };; (see the picture with cards) a. Write a function points : mazzo -> int = that given a deck of cards calculates its point score. The scoring is as follows: Ace is worth 1 point; Two, Three, King, Knight, Jack are each worth 1 3 ; and the rest do not contribute the the point total. The total point score is equal to the sum of the individual points, rounded down at the end. b. Write a function max_cards : mazzo -> mazzo = that takes a deck of cards and filters out everything except the greatest cards by value (valore) of each color. The order of cards by value is as follows: Three > Two > Ace > King > Knight > Jack > Seven > Six > Five > Four. Due to the size of the output, lists like…