Write a program In Java OOP language A house has 20 members and 20 loafs. A man can eat 3 loafs, women can eat 2 loafs, and child can have only ½ loaf. Each day the 20 loafs are distributed evenly among the members. How many men, women, and kids are in the house?
Q: Write a java program to find the penultimate word of a sentence. You have to take user input for…
A: Requirements:- Approach:- Penultimate is the last seccond word. SO we have to take user input and…
Q: Write a program in Java language to manage a hotel with 25 rooms, 10 rooms are executive, with…
A: Please find the code in java below
Q: Write a program RandomWalker.java that takes an integer command-line argument r and simulates the…
A: ould be "<r", iso "<=r", otherwise the steps will count 1+ time. Share Edit Follow…
Q: Write Pseudocode in Java for a program that uses a bag to manage a clothing store's inventory, the…
A: Please upvote me please. I need it badly. Please. I am providing the code for the question in java…
Q: Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D,…
A: Code: #include <iostream>using namespace std; int main() { string grade; int…
Q: Write a program to define two integer variables and assign values to them (you can use any values…
A: Here, first you need to declare all variables i.e 2 integer variables and other variables for…
Q: Write a program in java to find the hours, minutes and seconds from the given seconds. You should…
A: Required:- Approach:- formula used for seconds = Total seconds % 60 for minutes = (Total seconds…
Q: Develop a JAVA program to computer the queries in X Y z format where you are given a list of size m.…
A: We have to write a Java program according to the given instructions. Algorithm: 1. Take input from…
Q: Develop a JAVA program to computer the queries in X Y z format where you are given a list of size m.…
A: In this question we have to write a Java program according to the given instructions. Algorithm:…
Q: a three-month delivery report for three diffrent years. The following rows and columns represent the…
A: Step 1: Below the java program to display a three-month delivery report for three different years
Q: Write a program to define two integer variables and assign values to them (you can use any values…
A: Here, first you need to declare all variables i.e 2 integer variables (a and b) and other variables…
Q: We want a Java program or C++ for an online store (The idea of the program is a shoe store and the…
A: class Shoe{ private: string type,color,usern,pwd; int id,price,quantity; int…
Q: Develop a JAVA program to computer the queries in X Y z format where you are given a list of size m.…
A: Required: We have to write a Java program according to the given instructions. Algorithm: 1. Take…
Q: in java using import java.util.Scanner; Bowling involves 10 frames. Each frame starts with 10 pins.…
A: Code: using System;class HelloWorld {static void Main(){ int i,frame_number,throw_number;int []…
Q: Write a java program to simulate a car insurance We have a problem, which is calculating the…
A: Here i explain it clearly. ============================================================ you want to…
Q: dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as…
A: Q. Write a program that plays a dice game called "21"
Q: Write a java program for the following Example for call by value. Example for call by reference.…
A: ALGORITHM:- 1. Define variables x & y for both call by value and reference. 2. Pass them to the…
Q: Write a program using c++that plays a dice game called "21" It is a variation on BlackJack where…
A: I will implement the above game with the help of rand() function in c++ to get a random number…
Q: Write a computer program to model the motion of a spacecraft of mass 150000 kg that is launched from…
A: Answer
Q: Create a cashiering system in Java that applies the OOP concept. There should be a receipt that will…
A: Object Oriented Concept uses class and object in which class refers to a blueprint or template which…
Q: Q.1 / Write a program in C ++ language that introduces the salaries of ten teachers in five…
A: logic:- create a 2d matrix of size 5*10 each row will store 10 teachers salary and it will denote…
Q: Develop a JAVA program to computer the queries in X Y z format where you are given a list of size m.…
A: Code Flow: According to the given statement of the problem we need to upgrade the Java code to get…
Q: java program to print all numbers between 1 to 100 which is divisible by 3
A: java program to print all numbers between 1 to 100 which is divisible by 3
Q: Implement a Circle and a Student class (each student has name, last name, student number and GPA)
A: In older times, mostly all the applications required java to be installed in system, to be worked…
Q: Write a computer program to model the motion of a spacecraft of mass 150000 kg that is launched from…
A: Answer
Q: Write a Java program that simulates a meeting reservation system. The program shall allow the user…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Develop a JAVA program to computer the queries in X Y z format where you are given a list of size m.…
A: We have to write a Java program according to the given instructions. Algorithm: 1. Take input from…
Q: Write a program in the C++ language to receive student information from the second stage as follows…
A: - We have to code the scorecard problem. - We are using C++ here.
Q: Write a program that simulates the control software for a “people mover" system, a set of driverless…
A: Given requirement, Write a program that simulates the control software for a "people mover" system,…
Q: Programming language is C. I would really be appriciate if you could help me with this. Please…
A: According to question In C In this project, we shall simulate the operations of an ATM machine.
Q: Write a program in java to check whether a person is eligible for marry or not. Consider for men the…
A: Required:- Write a program in java to check whether a person is eligible for marriage or not.…
Q: Write a program FirstToFive that simulates a head-to-head match where two players, Daniel and…
A: I have provided JAVA CODE along with CODE SCREENSHOT and TWO OUTPUT…
Q: Wap in java to find the kinetic energy of the particle of mass 3 kg moving with the 20m/s speed
A: We have to write a program in java to find the kinetic energy of the particle of mass 3 kg moving…
Q: Write a Java program that implements the static method capitalize() which capitalizes the first…
A: The first letter will be converted to uppercase and then the remaining are checked and converted if…
Q: Write a program in the C++ language to receive student information from the second stage as follows…
A: Find the code attached.
Q: Q.1/Write a program in C++ language that introduces the salaries of ten teachers in five departments…
A: Use a 2-D array to store salaries of 10 teachers of 5 departments
Q: Write a Java program code: Scenario: One of the renowned supermarket in Dhaka City, “Shwapno” is…
A: Program with comments: //custom exceptionpublic class NameException extends Exception{ //…
Q: Write a program in Nim language to greet anyone which take name as input before asking what is your…
A: Required:- Write a program in Nim language to greet anyone which takes the name as input before…
Q: Write a JAVA program that takes input a single line sentence and displays the second word of the…
A: Write a JAVA program that takes input a single line sentence and displays the second word of the…
Q: Write a program in the language of two people in a 1:3 ratio, if the heir is male, the share is…
A: Introduction Input : Heir type Amount Output : Share of parents and heir
Q: write a c program Count Dracula buys blood from the public. But since he prefers certain types to…
A: Given The answer is given below.
Q: Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the…
A: Q. Write a program that plays a dice game called "21" It is a variation on BlackJack where one…
Q: Write a Java procedural program that helps organise travellers with a specific travel company…
A: Table must contain the details of the passengers, each table has the following attributes:
Q: Write a c++ program for a bank in your town that updates its customers’ accounts at the end of each…
A: Objective: This program implements the Bank account problem in which the user inserts values for his…
Q: write a program in c++ Language that require from user to insert the total number of students and…
A: #include <iostream> using namespace std; int main(){ //Variable declaration float…
Q: Write a c++ program to assign passengers seats in an airplane. Assume a small airplane with seat…
A: Program Approach: Define a function named allfilled() with parameter as array. It will check…
Q: Write a program that can arrange a group of pebbles into its designated position. We have 4 types of…
A: import java.util.*;public class Main { public static String repeat(char ch, int val){…
Q: Write a Java program to count the letters, spaces, numbers and other characters of an input string.…
A: code :- // import Scanner class import java.util.Scanner; public class Main{ public…
Q: A C program that allows a student to take a quiz and automatically grades it. It should support…
A: I have implemented a mini quiz on continents and oceans of 5 questions in C language. Comments are…
Q: Write a program In Java OOP language A house has 20 members and 20 loafs. A man can eat 3 loafs,…
A: In the main class declare the variable m,w,c and b as float. Initialize the variable ma and c to 0…
Write a program In Java OOP language
A house has 20 members and 20 loafs. A man can eat 3 loafs, women can eat 2 loafs, and child can have only ½ loaf. Each day the 20 loafs are distributed evenly among the members. How many men, women, and kids are in the house?
Step by step
Solved in 2 steps
- Using Java programming language write a program to manage a hotel with 24 rooms;10 rooms are Executive, with price Gh ₵ 2500.00 per night, 7 rooms are Chalets, with amounts Gh ₵ 1500.00 per night7 rooms are Ordinary, with amount Gh ₵ 500.00 per night The program should allow customers to book for rooms for a number of nights, and update the number of empty rooms available for each category when a customer has paid fully and has checked-in; also update the number of empty rooms available when customer checks-out. Customers should make bookings with their first names, telephone number A customer should be prompted to know if a room is booked (meaning a another customer has booked it but has not paid fully, or has not checked-in) A customer should be prompted to know if a room is occupied (meaning a booked room has been fully paid for, or the customer has checked-in) A customer should be prompted to know if a room is available (meaning a room has neither been booked nor checked-in). A…Write a program in Java language to manage a hotel with 25 rooms, 10 rooms are executive, with price 2500 Gh cedis, 7 rooms are charlet, with amount 1500 Gh cedis, 7 rooms are normal, with amount 500 Gh cedis, The program should allow customers to book rooms for a number of nights and update the number of empty rooms available for each category when a customer has fully paid and has checked- in, also update the number of empty rooms when the customer has checks-out Customers should make bookings with their first name and telephone number A customer should be prompted to know if a room has been booked ( meaning another customer has booked it but not fully paid or not checked-in ) A customer should be prompted to know if a room has been occupied ( meaning another customer has fully paid or checked-in) A customer should be prompted to know if a room is available ( meaning the room is neither been booked nor checked in) A customer should be able to know if an available room from…Using Java programming language write a program to manage a hotel with 24 rooms;10 rooms are Executive, with price Gh ₵ 2500.00 per night,7 rooms are Chalets, with amounts Gh ₵ 1500.00 per night7 rooms are Ordinary, with amount Gh ₵ 500.00 per night.
- In python Programming, Suppose you have four dogs named Leo, Tom, Jerry, and Jack, and four dog food bowls labeled 1, 2, 3, and 4. Each bowl can hold up to sixteen scoops of food and each dog chooses a separate bowl, but it doesn't matter which dog uses which bowl. For their dinner each day, you distribute sixteen scoops of dog food into the bowls, so each bowl will receive a whole number units of food. You are pretty careless, and you sometimes leave some bowls empty. If you always put out the full sixteen units of food each day, how many ways can you distribute the food among the four bowls?Write a program that deals a number of cards (their numerical values) to a player's hand. To begin, the program asks the player for the values of the deck of cards. Then, the program deals the first two cards of the deck to a player's hand, and asks him if he wants another card. If he does not want a card, the program ends. If he wants a card, the program deals the next available card in the deck, adds it to the player's hand, and asks the player if he wants another card. The dealing process repeats as long as the user continues to accept cards, or until the cards in the deck run out. Card dealing involves copying the available card from the deck vector to another vector, which stores the player's hand, at the next available position. Assume that the deck of cards consists of only 10 cards with numerical values from 1 to 10, which the player will enter by keyboard before the program deals. The following functions must be implemented/used: enterDeckValues. - This…Write a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get 21 or as close to 21 without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is declared. Otherwise,…
- Write a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get 21 or as close to 21 without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is declared. Otherwise,…A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours. Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the 20 hours they worked overtime. Therefore, they earned: ($20/hr * 40hrs) + ($30/hr * 20 hrs) = $800 + $600 = $1400 total.Program in C++ or Java Simple simulation to estimate your likelihood of winning in a game of poker. Assume the game has 6 players.• Repeatedly (500-1000 times):◦ Shuffle the 52-card deck, and deal yourself a 5-card hand.◦ Repeatedly (500-1000 times): ▪ Using the remaining 47 cards, deal the other 5 players their hands ▪ Determine if you would win or lose that hand; that is, if your hand would rank highest.2 Update some counters accordingly. ▪ Reshuffle the deck of 47 cards ◦ Record the proportion of the above hands which you won.• For each rank of hand, report the percentage of hands having that rank, and the average winning percentage (average of the averages) for each rank. Produce 2 output files• A session log output as a CSV (comma-separated value) file, with each hand on a separate line. For each hand: the cards in the hand; what the hand was evaluated as; and its winning percentage.• A summary showing the percentage of hands falling into each rank, and the overall win…
- MBG students want to change the genetics of plants in AGU. The new plant has a different growing sequence. It grows t cm each day, but every night it loses its height by k cm. While they were discussing that new interesting model, they wanted to formalize the growing algorithm. You should help the student calculate how many days are needed for the plant to grow m cm. Your program on java will take 3 integer values, t, k, and m, respectively. One line output will be showing the number of days. Sample Input: 4 1 5 Sample Output: 2Java Only Solution: John's barn has a fence consisting of N consecutive sections numbered from left to right from 1 to N. Each part is first painted in one of two colors: red or green, your information is given with string C. The color of the I-th part Ci will be equal to 'R' if the color of the part is red and 'G' if it is green. John decided to paint the whole fence green. To make the normal drawing process more fun he decided to do it using the following process. Every minute (until the whole fence is painted green) you will do the following steps: Select any part of the phone that is painted red. Let's show the index of this section as X. In each section with references X, X + 1, ..., min (N, X + K - 1), flip the color of the corresponding part from red to green and from green to red by re-painting. John wonders how quickly he can paint the phone. Please help her find the minimum number of minutes needed to repaint. Input: 1 73 RGGRGRG Output: 4Python programming In a department store sale, customers who purchase over 2000 are given 10% discount. Write a program that will accept for the purchase amount of a customer, solve for his/her discount if there’s any, ask for the money he/she is going to pay, then output the discounted price and the change of the customer.”