write a java program that accepts an ordinary number and outputs its equivalent roman numerals. the ordinary numbers and their equivalent roman numerals are given below: ordinary numbers roman numerals.
Misha was playing with Balanced Brackets alone. Mykhailo also wanted to play the game with her, so he comes up and asks her a question.
Misha is allowed to chose a sub-sequence (i.e. not necessarily contiguous substring) of brackets. AFTER chosing a the sub-sequence, she is allowed to re-arrange it (if needed) such that this chosen sub-sequence (after rearrangement) is balanced. Find the maximum length of this sub-sequence. (Please note that the resulting sub-sequence , after rearrangement MUST be balanced.)
For each testcase, the maximum possible length of balanced string.
Given an array A of N integers and two integers X and Y, find the number of integers in the array that are both less than or equal to X and divisible by Y.
For each test case, output a single line containing the answer.
Chapter 7Assignment(Popular Candy)–15points Your goal is to record the sales for 4 different types of candy and determine the total sales and the names of the highest and lowest selling candies.
•Create a String array that stores four different types of candy. Pick whatever candy you would like.(3points)•
Have the program prompt the user to enter the number of candy boxes sold for each type of candy using an array. Do NOT accept negative values for the number of candy boxes sold. Store these numbers into an integer array.(6 points )
•Display the total sales, and the names of the highest selling and lowest selling candy items.(6points)
Write a Java program to display the three top sales made by employees of an organization. The rows and columns represent the sales made by each employee identified by their employee number. SALES 1 SALES 2 SALES 3 101111 R 3 000 R 2 000 R 3 500 101122 R 2 500 R 5 500 R 3 500 101133 R 1 100 R 2 000 R 4 500 101144 R 1 700 R 2 700 R 2 500 101155 R 5 000 R 2 900 R 5 900 Using a Two Dimensional array produce the employee sales report, and the total sales made by each employee.
To qualify for an International Conference for Women in Computing (ICWC) next year in Toronto, Canada a student have got a distinction (a mark greater than 75) in PRG510S, be a female, and below the age of 25. Write a simple program that receives a mark, gender, and age from the keyboard and displays a corresponding message basing on the input.
Sample Run 1:
Mark: 70
Gender: female
Age: 21
Output1: Unfortunately you do not qualify!
Sample Run 2
Mark: 83
Gender: female
Age: 21
Output2: Congratulations! You might be in Toronto, Canada next year for ICWC!CreateabaseclasscalledAnimalwhichhas2classfields.ThefirstfieldholdsanintegerIDtagfora numberthatazoousestocataloguetheiranimals&thesecondfieldholdsastringcalledspecies. FromtheAnimalclass,derive2classesOneisBird&theotherReptile.Birdclasshasanadditional classfieldcalledcolourwhichholdsthe colour of the birds feathers(int – 1=grey, 2=white, 3=black).reptile class has an additional class field called bloodTemp which hold the reptiles temperature of their blood (double).You need to instantiate two 2 objects.bird object will be called brd.reptile object called rept.Input values for the bird’s IDtag,species & feather colour(int) & for the reptile’s IDtag number,species & bloodTemp.Override the Animal class’s input & output methods.Each derived class must have its own constructor.Write methods to input & output values to the class fields for all classes & then print out the values of the bird & reptile class fields with labels identifying the values.
Write a java program where a user enters and stores the average monthly rainfall figures (int) for three (3) towns over a year. The rows represent the months, and the columns represent the towns.
Calculate and print the total rainfall figures for each town, and the average rainfall for each month. Use a switch statement to print out the month name according to the column subscript value (E.g. if col = 0, then print January, col = 1 then print February, etc.) with the corresponding total alongside it.
write a simple application which takes data from the console and saves it to a file. The program should take the following data:
name, address and phone number. The program should have a menu which allows users to load data from previous sessions.