自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(84)
  • 收藏
  • 关注

原创 二叉树,通过前序遍历和后序遍历

2024-11-09 17:47:11 49

原创 构造哈夫曼树(霍夫曼树)

2024-11-09 17:37:01 55

原创 2021-11-01

Computers understand only numbers, so every character has a numeric representation.The program you are given takes a character as input. Write a program to output its numeric value.Sample InputaSample Output97//Java import java.util.Scanner;class

2021-11-01 10:54:49 145

原创 2021-11-01

Complete and overload the doubleTheValue() method to calculate the double the value of the a and b variables.//Java public class Main { public static void main(String[] args) { int a = 5; double b = 10.2; Sys

2021-11-01 10:04:18 126

原创 2021-10-30

A board game company creates new board games every year. While all the games have different rules, they also are all similar in that they each have a name and a play() method.We need to create 3 different games - Monopoly, Chess and Battleships. In the pl

2021-10-30 08:30:20 133

原创 2021-10-28

You are writing a program that calculates interest income based on account type. If it is a saving account, 20% is added to the balance in the account. If it is a checking account, 5% more is added to the balance in the account.The program you are given

2021-10-28 14:00:00 134

原创 2021-10-27

Vehicles can be classified according to what energy source powers them. The program you are given has 3 vehicle classes: Vehicle, ElectricVehicle and HybridVehicle.ElectricVehicle and HybridVehicle classes are inherited from Vehicle class.Complete the pr

2021-10-27 22:59:38 121

原创 2021-10-27

You are developing your own photo editing application.The standard free version allows you to draw and write text on a photo. The Pro subscription has 2 more features - the ability to use effects and the ability to change resolution.Complete/fix the giv

2021-10-27 14:35:08 166

原创 2021-10-27

You work in finance at IT company,The program you are given takes the total income and the tax percent as input, and creates an income object with public total income, tax percent and private net revenue attributes.Complete the class by methods which wil

2021-10-27 14:23:12 152

原创 2021-10-27

You need a program to manage admissions for an art school. Pupils can be admitted to the school if they are over 6 years of age.You’re given a program which declares a Pupil class.TaskComplete the setAge method of the Pupil class. If the value of parame

2021-10-27 14:15:11 115

原创 2021-10-27

Write a program to take numbers as input and return the first number raised to the power of the second number.Sample Input24Sample Output16.0import java.util.Scanner;class Main { public static void main(String[] args) { Scanner read = new

2021-10-27 13:53:53 87

原创 2021-10-25

Your friend is a cashier at a movie theater. He knows that you are an awesome java developer so he asked you to help him out and create a program that gets movie title, row, and seat information and prints out a new ticket.Complete the existing code by ad

2021-10-25 16:17:08 113

原创 2021-10-25

We are creating our own application for taking screenshots.It has an option to set a name for screenshot-file to be saved. If user doesn’t insert a name for it while saving, program automatically sets “Screenshot” name for it.Given program should create

2021-10-25 13:00:49 125

原创 2021-10-25

The program you are given receives name and age of student as input.Complete the program to set the values for the corresponding attributes of the Student class and prints out the final result. If the age is <0, program should output “Invalid age” and

2021-10-25 12:26:28 156

原创 2021-10-25

You are a manager at company that have two employees, James and Tom.You wrote a program to calculate total employee salary: it creates two objects for workers and sets the corresponding parameters.But something is wrong. The program doesn’t provide acces

2021-10-25 09:20:59 99

原创 2021-10-25

You are the administrator of a hotel and must create customer information cards for your new customers. On the card, you must note the customer’s first and last name, age, and room number.The program you are given takes a guest’s data (first name, last na

2021-10-25 09:06:57 173

原创 2021-10-23

Create a program to show loading message to your application users.Define a class Loading which has one public method called LoadingMessage(), which should print “Loading” when called.Create an object named loading and call that method.public class Main

2021-10-23 06:53:13 108

原创 2021-10-22

You are an assistant on a TV show where celebrities are dancing and 4 judges evaluate their performance and give them a score between 1 and 10.The program you are given takes the scores as input.Complete the method to take them as parameters, then calcul

2021-10-22 09:59:00 120

原创 2021-10-22

The program you are given takes length and width of a rectangle as input.Complete the method to take them as parameters, then calculate and output the area of the rectangle.Sample Input45Sample Output20import java.util.Scanner;public class Main {

2021-10-22 03:39:49 77

原创 2021-10-22

public class Main {public static void main(String[] args) {int[][] matrix = {{8, 1, 6},{3, 5, 7},{4, 9, 0},};//output the numbersfor(int i=0;i<3;i++){for(int j=0;j<matrix[i].length;j++)System.out.println(matrix[i][j]);}//System.out.printl

2021-10-22 03:26:32 85

原创 2021-10-19

You are creating a bowling game!The given code declares a Bowling class with its constructor and addPlayer() method.Each player of the game has a name and points, and are stored in the players HashMap.The code in main takes 3 players data as input and a

2021-10-19 13:59:43 323

原创 2021-10-19

You are working on a graphical app, which includes multiple different shapes.The given code declares a base Shape class with an abstract area() method and a width attribute.You need to create two Shape subclasses, Square and Circle, which initialize the

2021-10-19 12:23:55 138

原创 2021-10-15

The binary numeric system uses only two digits: 0 and 1. Computers operate in binary, meaning they store data and perform calculations using only zeros and ones.You need to make a program to convert integer numbers to their binary representation.Create a

2021-10-15 23:09:59 69

原创 2021-10-08

Write a program to take a string as input and output its reverse.The given code takes a string as input and converts it into a char array, which contains letters of the string as its elements.Sample Input:hello thereSample Output:ereht ollehimport ja

2021-10-08 00:33:56 60

原创 2021-10-05

Your company is writing a program for a geometry course.The program takes the number of squares as the first input, creates an array, and then takes the sides of squares as its elements.Write the part of the program that receives a list of square sides a

2021-10-05 21:39:33 69

原创 2021-09-18

You are given a program that takes the length of the array as the first input, creates it, and then takes the next inputs as elements of the array.Complete the program to go through the array and calculate the sum of the numbers that are multiples of 4.S

2021-09-18 21:45:33 73

原创 2021-09-17

Loan Calculator 贷款计算器(Java练习题)You take a loan from a friend and need to calculate how much you will owe him after 3 months.You are going to pay him back 10% of the remaining loan amount each month.Create a program that takes the loan amount as input, ca

2021-09-17 10:45:26 170

原创 2021-09-16

You’re creating a bank security system. The user must insert the correct password in order to access payments.The password is 8819.TaskWrite a program that will continuously take a password as input and output Write password, until the client inserts th

2021-09-16 22:47:28 204

原创 2021-09-15

You are a game developer and the game you currently working on is a deck dealer which deals 7 cards representing the players’ roles.5 of them are good guys and 2 of them are bad guys.Write a program that will take the bad guys numbers as input and output

2021-09-15 18:21:10 81

原创 2021-09-14

You are given code that takes the number of students who enter the university as input. Let’s greet them!TaskComplete the program to output “Welcome” for each student.Sample Input2Sample OutputWelcomeWelcomeimport java.util.Scanner;public class

2021-09-14 22:59:05 69

原创 2021-09-14

A client wants you to write a program that prints all numbers from 1 to the inputted number that are either a multiplier of 3 or end with 3.Sample input14Sample output3691213import java.util.Scanner;public class Main { public static void main

2021-09-14 14:30:57 65

原创 2021-09-13

For your math class you need a program to calculate the factorial of a number.You’re given a program which takes a number as input.TaskComplete the program to calculate the factorial of the given number and output it.Sample input6Sample output720Ex

2021-09-13 06:20:24 73

原创 2021-09-11

Your robot can recognize your emotions marked with number that represents each of them:1 - You are happy!2 - You are sad!3 - You are angry!4 - You are surprised!Write a program that takes the emotion number as input and outputs the corresponding messa

2021-09-11 21:52:31 110

原创 2021-09-09

You are an administrator at a football club who must categorize already played games on the team’s website.The given program takes 3 inputs:match status - which checks if the match is suspended (“true”) or not suspended (“false”)your team’s scoreoppos

2021-09-09 00:21:37 102

原创 2021-09-07

You need a program to convert days to seconds.The given code takes the amount of days as input. Complete the code to convert it to seconds and output the result.Sample Input:12Sample Output:1036800import java.util.Scanner;public class Program { pu

2021-09-07 14:03:38 58

原创 2021-09-03

public class Main {public static void main(String[] args) {/So the program prints some oddnumbers and it works perfectly/System.out.println(“1”);System.out.println(“3”);System.out.println(“7”);}}

2021-09-03 00:21:13 58

原创 2021-09-03

public class Main {public static void main(String[] args) {//uncomment necessary line(s)//System.out.println(“Java is lame”);System.out.println(“Java is awesome”);//System.out.println(“Please uncomment me!!! ^^”);}}

2021-09-03 00:20:32 136

原创 2021-09-03

public class Program{public static void main(String[] args) {//print “Java is fun”System.out.println(“Java is fun”);}}

2021-09-03 00:15:22 57

原创 漫画进制(二)

`

2021-08-31 16:36:19 114

原创 2021-08-28

JavaComplete the given program to print “Java is fun”.Note that the sentence starts with a capital letter.HintJust add the text to the System.out.println() methodpublic class Program{public static void main(String[] args) {//print “Java is fun”Sys

2021-08-28 00:50:09 72

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除