Java 辅导

Java程序辅导 辅导Java编程作业

k-nearest neighbor search

Objective. The purpose of this assignment1 is to create a symbol table data type whose
keys are two-dimensional points. We’ll use a 2d-tree to support ecient range search (nd
all the points contained in a query rectangle) and k-nearest neighbor search (nd k points
that are closest to a query point). 2d-trees have numerous applications, ranging from
classifying astronomical objects to computer animation to speeding up neural networks
to mining data to image retrieval.
Geometric Primitives. Use the immutable data type Point2D for points in the plane.
Here is the subset of its API that you may use:
p u b l i c c l a s s

design and implement a 3D graphics

ThisdocumentintroducestheG53GRA2015courseworkincluding:
Introducingtheoverallchallengeofdesigningandimplementinga3Dgraphicsapplication.
Clarifyingthestructureofthecourseworkanddeliverables.
Specifyingtheformatsofthedeliverablesandthedatestheyneedtobehandedin.
Settingoutthemarkingcriteria.
Thecourseworkwillcountfor100%oftheassessmentofthemodule.
REQUIREMENTS
Inthiscourseworkyouarerequiredtoapplywhatyouhavelearntabout3DcomputergraphicsandOpenGL
tocreateanddisplayasceneofyourchoice.Thecourseworkwillnotonlytestyourunderstandingofthe
conceptsofcomputergraphics,butalsoyourabilitytoimplementa3Dgraphicalsystem.

CS111 Spring 2015 Project Description

In this project you will be using the knowledge you gained from lectures and homeworks and applying them to a lengthier programming assignment. The answers to some of your questions do not strictly reside in this document. You are encouraged to look at other sources for inspiration. This semester’s project will involve Creating a 2D game. This is an individual project, and as such you will be held to the University’s academic integrity policies. You are welcome to discuss strategies and ideas with other students (and will be encouraged to in recitation), but you must code the project on your own.

 

This project is what you make of it. Listed below are point guidelines as to how they relate to the number of points given to the project (total 100). However, you should not be limited by what we suggest the minimum work required here is. To get the most out of this project, I urge you all to push yourselves to find your limits. You might surprise yourself! Good luck!

Background

java maze solver

Due Date

Monday, April 20th, at 5:30pm

Important: This is an individual assignment. Please do not collaborate.

No late assignment will be accepted.

Make sure that you write every line of your code. Using code written by someone else will be considered a violation of the academic integrity and will result in a report to the Dean’s office.

Minimal Submitted Files

You are required, but not limited, to turn in the following source files:

Assignment11.java (You do not need to modify this file.)
MazeSolver.java — complete this file.
Position.java (You do not need to modify this

java game Joust

CS 1110/1111 – Spring 2015 – Partner Projects

Partner Project 2: Game Project – Due: Wednesday, April 22, 11:00 AM

Games, in addition to being fun, are also a great way to practice many aspects of programming. This semester we’ll create a game similar to the 1982 classic Joust. In our version we’ll have the two players be oponents instead of allies: they’ll ride giant birds and try to knock one another off their birds. You can try it either by running JoustDemo.jar or by importing into Eclipse JoustDemoProject.zip. The ask, and l keys control the birds.

You should work with one partner on this assignment. You should pick a partner in the Thursday, 2 April lab. Your partner 

CSE 143 Computer Programming II solution

CSE 143: Computer Programming II Spring 2015

HW2: HTMLManager (due Thursday, April 16, 2015 11:30pm)

This assignment focuses on using Stack and Queue collections. Turn in the following files using

the link on the course website:

• HTMLManager.java – A class that manages the source code for a website.

You will need the support files HTMLTag.java, HTMLTagType.java, HTMLParser.java, and HTML-
Main.java, and cse143.util from the resources button on the course website; place these in the same

folder as your program or project. You should not modify the provided files. The code you submit must

work properly with the unmodified versions.

Although this assignment relates to websites and HTML, you will not need to know how to write HTML

to complete the assignment.

What is HTML?

Web pages are written in a language called “Hypertext Markup Language”, or HTML. An HTML file

consists of text surrounded by markings called tags. Tags give information to the text, such as formatting

(bold, italic, etc.) or layout

Growing a Mango solution

Project No.2: Growing a Mango

This project consists of two parts. The first part is to write the code for class Mango, which is designed for a Mango tree that grows and whose fruits appreciate overtime. The second part is to write the code for class MansoSim, which conducts a simulation of growing various mango trees for a number of years, and produces information as to which mango tree will be the most profitable.

For the first part, we envision that each Mango tree has information about

    what kind it is, as a String, how tall the tree is, as an int (in inches), how much a fruit sells for, as an int (in cents).

Each year the tree receives some updates. First, the price appreciates by 1 percent.

Second, the tree grows. The growth in percentage ranges uniformly between 5 percent and 15 percent. However, if the tree grows too tall, it will go beyond the reach for pickers, and so it is trimmed down. We assume that whenever the tree grows taller than 260 inches it is trimmed down to 150 inches.

mfb21 solution

作业要求:

http://www.sussex.ac.uk/Users/mfb21/net/ex2/index.html

对于task1:
代码很少,主要功能就是输入一个URL,返回该网页的Status Code
CompilationTesterTask1.java就是直接给的样板测试文件 没做修改‍
住:    httpResultCode.get ( “www.mit.edu/” ); //在代码中改变URL可以得到不同测试结果
控制台命令:
Javac *.java (先编译)
Java Task1(执行main函数:看输出结果)
对于task2
共有五个java文件:
其中Class.java是事先给的,其中有函数的signature,抽象类等,其中Server和Client为两个接口
我在MyClient.java与MyServer.java里面继承了这两个抽象类,核心代码都在这里面
MyServer单独开了个线程作为服务器,通过start()函数开启线程,这样才能满足他给的测试代码的逻辑
其中CompilationTesterTask2.java就是事先给的测试代码,没做修改,但是测试代码的逻辑很奇怪:
You can use this code to check if your code compiles properly by compiling it t

java系列作业代写lab6

Section Readings: 2.3

Problem 1. (Sum of Integers) Implement the static methods sumIter() and sumRec() in

SumOfInts that take an integer argument n and return the sum S(n) = 1 + 2 + 3 + · · · + n,

computed iteratively (using a loop) and recursively. The recurrence relation for the latter

implementation is

$ java SumOfInts 100

5050 5050

Problem 2. (Exponentiation) Implement the static method power() in Power that takes

two integer arguments a and b and returns the value of a

the recurrence relation

$ java Power 3 5

243

Problem 3. (Bit Counts) Implement the static methods zeros() and ones() in Bits that

takes a bit string (ie, a string of zeros and ones) s as argument and returns the number

of zeros and ones in s, each computed recursively. Hint: First devise an appropriate

recurrence relation for the problem.

$ java Bits 1010010010011110001011111

zeros = 11 , ones = 14 , total = 25

Problem 4. (String Reversal) Implement the static method reverse() in Reverse that

takes a string s as argument