You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birth month? // calculate birth month based on the day of the month, day of the week, and the birth year // dayMonth {number} - a day of a month from 1 to 31 // dayWeek {string} the name of the day of the week // year {number} - the birth year // return {string} - the month you were born BirthdayLibrary.birthMonth(dayMonth, dayWeek, year); А. 1 В. 4 С. О D. 3
Q: How do I import a image file, for example a flower.png with the image of a sunflower, to a java…
A: How do I import a image file, for example a flower.png with the image of a sunflower, to a java…
Q: Can someone help me fix my code? I need to make a cashiering system with a receipt. I also wanted to…
A: Use a Scanner instance to accept input from user and do not close recourse in the method as we are…
Q: Write a program that asks a user to enter a first name, a last name, and a year, and construct an…
A: As the language is not specified answer written in python
Q: Write an application that accepts a word from a user and converts it to Pig Latin. If a word starts…
A: The ask is to take a single word input and convert into the PigLatin word. To convert into PigLatin,…
Q: Write an application that accepts a word from a user and converts it to Pig Latin. If a word starts…
A: The, code has given below:
Q: Each row of the csv file contains the showtime, title, and rating of a movie. Assume data of the…
A: Solution: Given,
Q: Write a static method called "initials" that takes as a parameter a String containing a persons…
A: import java.util.*;public class Initials { public static void main(String[] args) {…
Q: You have imported a library with the birthMonth() function. Based on the API, how many strings are…
A: Based on the API, there are only one strings as input to calculate the birth month.
Q: Write a java application for an Auto Car shop that shows a user a list of available services: oil…
A: The code is given below.
Q: Continuing from the example, modify the program so that it outputs the average grade in each course,…
A: I have separated the code for average with opening closing comments with heading my code. I am also…
Q: I have a django project that I am working on an I am trying to add a UserList to my Allgroups class.…
A: from django.contrib.auth.tests.custom_user import CustomUserManager from django.db import models…
Q: A company wants to secure users' passwords that consists of four digits only by encrytping them.…
A: The programming methodology for the program is given by: Including header files Function prototype…
Q: Write a Java program StringApplication which creates a sScanner object then does the following: 1.…
A: Program Approach: Importing necessary package Defining the main class Creating Scanner object…
Q: In JAVA please Write a Bucket class that has the following private members:…
A: public class Bucket { private final int capacity; private int current;…
Q: Modify songVerse to play "The Name Game" (OxfordDictionaries.com), by replacing "(Name)" with…
A: Here is the solution with an output:-
Q: t user to enter a string Count the occurrences of digital characters, uppercase letters, and…
A: java code : import java.util.Scanner; class CountCharTypes { public static void main(String[]…
Q: can you help me to draw the flowchart for this java code : LPHTb1.java import java.util.Scanner;…
A: Dear Student, The flowchart based on your program is given below, In you program you have given…
Q: p a crawler that collects the email addresses in the visited web pages. You can write a function…
A: Step 1: Below the function emails() that takes a document (as a string) as input and returns the…
Q: Create a class for an algebraic formula in a single variable. As a reminder, such a formula has the…
A: If you have been to highschool, you will have encountered the terms algebraic formula in a single…
Q: CAN YOU FIX MY CODE???
A: It is showing around 20 errors and the code is showing some errors at some lines. But our error is…
Q: help me run this code import java.util.*; class Main{ static int max_kids; HashMap > sports ;…
A: Given: To run the given code without error.
Q: How should I add a main to the Java code? import java.util.*; import java.util.Arrays; public…
A: You can add the main method in your after the last method which is boolean equal method. Below I add…
Q: Write a program that computes the power of an integer ax where the base is a and the exponent is x,…
A: According to the question below the Complete Program: Java Output:
Q: Implement the design of the Pizza class so that the following output is produced: # Write your…
A: The Pizza class has four variables to store the data values for the object of the pizza. The three…
Q: Write a Java program that implements the following classes: 1. The following class Menu which…
A: the code is an given below : \41 answers Answer: import java.util.*; class Menu{ private String[]…
Q: Hi, could you help me resolve this java problem? I don't get why it can't accept my "array of (Song)…
A: The only error in our program is that we have missed the attribute title in Song class
Q: Write a program in which you create an object of type ArrayList named BZ and then add 3 elements in…
A: Here have to determine java code for ArrayList problem.
Q: In Java. Write a method with the following header to format the integer with the specified width.…
A: public String format(int number, int width) The method returns a string for the number with one or…
Q: I need to write a program which allows me to input "3 Joe,123-5432 Linda,983-4123 Frank,867-5309…
A: So everything looks fine in your code. But the problem is that java file allowed only one public…
Q: Write a simple java program in which you have to implement all the java stringbuffer method listed…
A: Sample Response: //Java program to implement all the java stringbuffer methods such as capacity(),…
Q: Q- I want someone to convert this code to java code ASAP #include using namespace std; class…
A: Find the required code in java as below and output:
Q: In Java Only: My program is not working correctly, The history teacher at your school needs help…
A: Note: As you have asked to remove the "NullPointerException" from the calculatePoint function of the…
Q: In Java. Write a complete static method named favoriteWords that accepts, in order, an Scanner170…
A: Answer : Here is the Java Code : import java.util.*;class Main { // create static method for…
Q: Write a program that prompts the user to enter a positive integer which is greater than one and…
A: Let us consider a Java program that prompts the user to enter a positive integer and displays all…
Q: The problem I have is, say I am storing the phone number and don't want their phone number to…
A: import java.util.Scanner; class Clint { private String id; private String name;…
Q: Write a program called Guests.java that prompts a user to enter how many guests he will host. Next,…
A: Step-1: StartStep-2: Print message "Enter the number of Guests on the List:"Step-3: Declare an…
Q: Help me run this code import java.util.*; class Main{ static int max_kids; HashMap > sports ;…
A: Source code:- import java.util.*;class Main{ static int max_Students;…
Q: Write a program that will help an elementary school student learn multiplication. Use a Random…
A: #include<iostream> #include <stdlib.h> #include<string> using namespace std;…
Q: For this problem, you can use all classes in the java.util package. As a genius IT/SE student, you…
A: 1. create new class Covid varient .java a. create new variable code and sequence b.…
Q: Write a second convertToInches() with two double parameters, numFeet and numInches, that returns the…
A: Note: The function added in the code is along with the comments to have a better understanding of…
Q: Write a java program call CountVowelsDigits which prompts the user for a string, counts the number…
A: import java.util.Scanner;import java.lang.*;public class Main{ //method to print count and…
Q: write an extension method called toRoman to convert and int to its roman r
A: //Program using System; using System.Collections.Generic; using System.Linq; using System.Text;…
Q: Can you write a small java program where you dynamically display an array of strings or ArrayList of…
A: Here is the answer below:-
Q: I need to write a JAVA program that will allow me to insert "movies.csv" and output "Wonders of the…
A: Java Programming code for the given problem is given in step 2
Q: Write an expression to detect that the first character of userlnput matches firstLetter. 1 import…
A: The explanation of the expression is mentioned in the screenshot.
Q: 5. You have imported a library with the birthMonth() function. Based on the API, how many strings…
A: Answer: The answer is Option A. 1
Q: our class StringDoubling has a method doubleString(), which takes a String as an input parameter and…
A: We need to read the command line argument and use the doubleString() to double string and display…
Q: Write a program that computes the power of an integer a* where the base is a and the exponent is x,…
A: Required:
Q: Write a client program that allows the user to add up any number of non-zero fractions. The program…
A: An object of the class Fraction is made as f_s with value as fractions.get(0). Another object of the…
Q: in Java eclipse ide Read from console a 2-digit integer number, save it in variable vz. Check this…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- IN JAVA Create a function that takes a string and returns the number of alphanumeric characters that occur more than once. Examples duplicateCount ("abcde") → 0 duplicateCount ("aabbcde") → 2 duplicateCount ("Indivisibilities") → 2 duplicateCount ("Aa") → 0 // Case sensitiveCreate an application for generating lottery tickets of random numbers. Each lottery ticket has a fixed count of numbers to be played with each number selected being within a given range. For example, when the range of numbers is 1 through 100, and 5 numbers are to be played, the lottery ticket will be composed of 5 unique values between 1 and 100. The values are selected at random. The main function is responsible for obtaining the upper range of the numbers and the count of numbers to be played from the end user. The count of numbers must be less than the upper range. The main function will call the generateLotto function to generate the lottery ticket and then call the displayTicket function to display the resulting lottery ticket. Any number of lottery tickets may be generated. The generateLotto function should accept two parameters. The first should be the upper range for the numbers while the second parameter represents a count of the numbers to be played. For example,…Create an application for generating lottery tickets of random numbers. Each lottery ticket has a fixed count of numbers to be played with each number selected being within a given range. For example, when the range of numbers is 1 through 100, and 5 numbers are to be played, the lottery ticket will be composed of 5 unique values between 1 and 100. The values are selected at random. The main function is responsible for obtaining the upper range of the numbers and the count of numbers to be played from the end user. The count of numbers must be less than the upper range. The main function will call the generateLotto function to generate the lottery ticket and then call the displayTicket function to display the resulting lottery ticket. Any number of lottery tickets may be generated. The generateLotto function should accept two parameters. The first should be the upper range for the numbers while the second parameter represents a count of the numbers to be played. For example,…
- Create an application for generating lottery tickets of random numbers. Each lottery ticket has a fixed count of numbers to be played with each number selected being within a given range. For example, when the range of numbers is 1 through 100, and 5 numbers are to be played, the lottery ticket will be composed of 5 unique values between 1 and 100. The values are selected at random. The main function is responsible for obtaining the upper range of the numbers and the count of numbers to be played from the end user. The count of numbers must be less than the upper range. The main function will call the generateLotto function to generate the lottery ticket and then call the displayTicket function to display the resulting lottery ticket. Any number of lottery tickets may be generated. The generateLotto function should accept two parameters. The first should be the upper range for the numbers while the second parameter represents a count of the numbers to be played. For example,…Write a program email.cc that takes an email address in the following format: firstname.lastname@hotmail.com, such as jon.doe@hotmail.com, extracts from it the firstname and the lastname, and prints them in the following format: Lastname, Firstname. Your program should have and use at least the following functions:(a) getEmaillAddress that prompts a user to enter an email address as a string andreturns it.(b) extract that takes as its parameter an email address and returns the firstname andlastname.(c) capitalize that takes as its parameter a string and capitalize its first letter.(d) display that takes as its parameters 2 strings corresponding to the firstname andlastname, and displays them in the following format: Lastname, Firstname.Your program should repeatedly prompts the user to enter the email address in the previous format. The program should then output it as in the examples below. jon.doe@uleth.caDoe, JonTry again (Y/N) -- Ycarol.smith@uleth.caSmith, CarolTry again (Y/N)…Please do in Java In many computer systems and networks,different users are granted different levels of access to different resources. In this case, you are given a int[] rights, indicating the privilege level of each user to use some system resource. You are also given a int minPermission, which is the minimum permission a user must have to use this resource. You are to return a String indicating which users can and cannot access this resource. Each character in the return value corresponds to the element of users with the same index. 'A' indicates the user is allowed access, while 'D' indicates the user is denied access. Constraints users will contain between 0 and 50 elements, inclusive. Each element of users will be between 0 and 100, inclusive. minPermission will be between 0 and 100, inclusive. Examples a) {0,1,2,3,4,5} 2 Returns: "DDAAAA" Here, the first two users don't have sufficient privileges, but the remainder do. b) {5,3,2,10,0} 20 Returns: "DDDDD"…
- write an application that reads English-Language phrase and encodes it into morse code. also write an application that reads a phrase in morse code and converts it into the English-Language equivalent . Use one blank between each Morse-code letter and three blanks between each Morse-coded word.The file Parameters.java contains a program to test the variable-length method average.1. Read the code. Fill in the code to compute mean1 and mean2. Notice that you are calling the same method, but with a different number of parameters. 2. Add a call to find the average of a single integer, say 8. Print the result of the call. Is the result what you expected?3. Add a call with an empty parameter list and print the result. Is the result what you expected?4. Add a method called minimum to return the minimum value of the parameter list. Invoke this method in the main() and test it with different input numbers. //*******************************************************// Parameters.java//// Illustrates the concept of a variable parameter list.//*******************************************************import java.util.Scanner;public class Parameters{ //----------------------------------------------- // Calls the average and minimum methods with // different numbers of parameters.…Define a class called StringFormatter. The purpose of an object of this class is to store a string variable (you may use the C++ string type or a char array). An object of this class can be created by calling a constructor that accepts one string argument. The string to be passed as argument will be a long line of text, such as “The world is indeed full of peril and in it there are many dark places. But still there is much that is fair. And though in all lands, love is now mingled with grief, it still grows, perhaps, the greater.” The object will also have a function called printRightAligned() which accepts one integer argument n. The value of the argument represents the maximum number of characters that can be displayed on a line. This function displays the string stored in the object’s attribute on the screen, right aligned and with no more than n characters per line. Similarly, there should be a function called printLeftAlgigned() which displays the text left aligned, again, with no…
- C++: Create a basic contact book where you can store and then retrieve contact information.The information that (at least) should be able to be stored is name (postal) address e-mail address telephone number Birthday, other. It should work as follows. The user should be able to choose what he wants to do, for example : add contact or find the phone number of a given contact. There are several ways to implement this, for example: • To have a menu where the user can choose by entering a number corresponding to one of the menu options. Exit should be one of the options. • where the user gives commands for what to do. The functionality that must exist is • to add a contact, • to delete a contact, • to search for a contact. The contact book should be saved in a file so that it does not disappear between runs of the program.In Java: The CSV (or comma-separated values) format is commonly used for tabular data. Each table row is a line, with columns separated by commas. Items may be enclosed in quotation marks, and they must be if they contain commas or quotation marks. Quotation marks inside quoted fields are doubled. Here is a line with four fields:1729, San Francisco, "Hello, World", "He asked: ""Quo vadis?""" Implement a class CSVReader that reads a CSV file, and provide methodsint numberOfRows()int numberOfFields(int row)String field(int row, int column)Magic Squares One interesting application of two-dimensional arrays is magic squares. A magic square is a square matrix in which the sum of every row, every column, and both diagonals is the same. Magic squares have been studied for many years, and there are some particularly famous magic squares. In this exercise you will write code to determine whether a square is magic. File Square.java contains the shell for a class that represents a square matrix. It contains headers for a constructor that gives the size of the square and methods to read values into the square, print the square, find the sum of a given row, find the sum of a given column, find the sum of the main (or other) diagonal, and determine whether the square is magic. The read method is given for you; you will need to write the others. Note that the read method takes a Scanner object as a parameter. File SquareTest.java contains the shell for a program that reads input for squares from a file named magicData and tells…