Skip to main content
guest
Join
|
Help
|
Sign In
programingstuffffff
Home
guest
|
Join
|
Help
|
Sign In
programingstuffffff
Wiki Home
Recent Changes
Pages and Files
Members
Favorites
20
All Pages
20
home
Add
Add "All Pages"
Done
home
Edit
0
18
…
0
Tags
No tags
Notify
RSS
Backlinks
Source
Print
Export (PDF)
flow chart progaming test.docx
Details
Download
25 KB
project 1:
firetruck.a2w
Details
Download
1 MB
andy sage 1.html
Details
Download
30 KB
project 2:
flow chart.docx
Details
Download
49 KB
partner project:
guy hit by car.a2w
Details
Download
1 MB
skyler project.a2w
Details
Download
1 MB
Game:
firetruck actuall food.a2w
Details
Download
2 MB
Alice final project (modified version of the game):
firetruck actuall food.a2w
Details
Download
2 MB
Java Project1:
/
Andys
Payrole
Program
*
*/
import
java.util.Scanner;
publicclass
payrole_program {
publicstaticvoid
main(String[] args) {
Scanner input =
new
Scanner( System.
in
);
System.
out
.println(
"Please enter your hourly rate"
);
This asks the user to enter the hourly wage for that employee
double
rate = input.nextDouble();
System.
out
.println(
"Please enter your hours worked"
);
This asks the user to input how many hours the employee worked for that week.
double
hours = input.nextDouble();
System.
out
.println(
"Your total pay for this week"
);
This tells the user that the following displayed information is the employee's
double
total_pay = (hours*rate);
System.
out
.printf(
"The total pay is $%.2f"
, total_pay);
System.
out
.println(
"Good job!"
);
System.
out
.println(
"NOW GET BACK TO WORK!!!"
);
}
}
Chapter 8 project:
import
java.util.Scanner;
publicclass
cylinderVolume {
/
By:
Andy
Sage
Chapter 8 Project
*/
public
static
void
main(String[] args) {
Scanner keyboard =
new
Scanner(System.
in
);
/
It now asks for the radius of the cylinder
*/
System.
out
.println(
"What is the radius of the cylinder that you are trying to find the area of? "
);
double
radius = keyboard.nextDouble();
/
It now ask for the height of the cylinder
*/
System.
out
.println(
"Now what is the height of the cylinder? "
);
double
height = keyboard.nextDouble();
/
Pi variable
*/
double
Pi = 22/7;
/
calculate area of cylinder
*/
double
area = Pi*radius*radius*height;
System.
out
.print(
"The area of the cylinder that you are finding the area of is "
+ area);
System.
out
//.print(
"Your Welcome!!!!!"
);
}
}
chapter 9 book work:
import
java.util.Scanner;
public
class
BaloonPrank {
public
static
void
main(String [] args) {
roommate's bedroom dimensions (in feet)
final
double
LENGTH = 9.0;
final
double
WIDTH = 8.0;
final
double
HEIGHT = 7.0;
get the balloon radius
System.
out
.print(
"Enter a balloon radius in inches:"
);
Scanner keyboard =
new
Scanner (System.
in
);
double
balloonRadius = keyboard.nextDouble();
balloonRadius /= 12.0;
convert inches to feet
Sphere balloon =
new
Sphere
(balloonRadius) ;
Box
bedroom =
new
Box
(LENGTH, WIDTH, HEIGHT);
compute balloons in bedroom
double
balloonsRequired = bedroom.volume() /balloon.
volume
();
System.
out
.printf (
"Using balloons of radius %.Of inches,"
+
"you will need %.Ofballoons"
, balloonRadius*12, balloonsRequired) ; }}
JAVA FINAL PROJECT:
public
class
finals
extends
Microcontroller
{
private
MultiDigitLedDisplay
ledDisplay
;
sets led display type
private
Port
segmentPort
=
getHardware
().getPort(
"D"
);
private
Port
commonPort
=
getHardware
().getPort(
"C"
);
private
Pin
common0
=
commonPort
.getPin(1);
private
Pin
common1
=
commonPort
.getPin(2);
private
Pin
common2
=
commonPort
.getPin(3);
private
Pin
common3
=
commonPort
.getPin(4);
private
Timer
ledDisplayTimer
;
sets display time
public
void
init() {
getHardware
().setAllPortsDirection(
Pin
.IN); }
getHardware().setAllPortsPullUp
(
true
);
ledDisplay
=
new
MultiDigitLedDisplay
(
true
,
//common anode
segmentPort
,
common0
,
common1
,
common2
,
common3
);
ledDisplayTimer
=
getHardware
().getDefaultTimer(8);
ledDisplayTimer
.setMode(
TimerMode
.NORMAL);
ledDisplayTimer
.setPrescaling(8);
ledDisplayTimer
.setEnabled(
true
);
LedDisplayDigitMultiplexer multiplexer =
new
LedDisplayDigitMultiplexer();
ledDisplayTimer
.addTimerListener(multiplexer);
ledDisplayTimer
.setTimerOverflowedFired(
true
);
}
public
void
start() {
ledDisplay
.setDigitValue(0, 0);
ledDisplay
.setDigitValue(1, 0);
ledDisplay
.setDigitValue(2, 0);
ledDisplay
.setDigitValue(3, 0);
getHardware
().setInterruptsEnabled(
true
);
for
(;;)
{
for
(
int
digit = 0; digit < 4; digit++)
{
int
value =
ledDisplay
.getDigitValue(digit);
if
(++value > 10) value = 0;
ledDisplay
.setDigitValue(digit, value);
getHardware
().getDelay().sleep(250);
}
}
}
private
class
LedDisplayDigitMultiplexer
implements
TimerListener
{
public
void
timerOverflowed()
{
ledDisplay
.processMultiplexing();
}
}
}
Javascript Required
You need to enable Javascript in your browser to edit pages.
help on how to format text
Turn off "Getting Started"
Home
...
Loading...
project 1:
project 2:

flow chart.docx
- Details
- Download
- 49 KB
partner project:Game:
Alice final project (modified version of the game):
Java Project1:
/Andys Payrole Program
**/import
java.util.Scanner;
publicclass payrole_program {
publicstaticvoid main(String[] args) {
Scanner input =
new Scanner( System.in );
System.
out.println("Please enter your hourly rate"); This asks the user to enter the hourly wage for that employee
double rate = input.nextDouble();
System.
out.println("Please enter your hours worked"); This asks the user to input how many hours the employee worked for that week.
double hours = input.nextDouble();
System.
out.println("Your total pay for this week"); This tells the user that the following displayed information is the employee's
double total_pay = (hours*rate);
System.
out.printf("The total pay is $%.2f", total_pay);
System.
out.println("Good job!");
System.
out.println("NOW GET BACK TO WORK!!!");
}
}
Chapter 8 project:
import
java.util.Scanner;
publicclass cylinderVolume {
/
By: Andy SageChapter 8 Project*/
publicstaticvoid main(String[] args) {
Scanner keyboard =
new Scanner(System.
in);
/ It now asks for the radius of the cylinder
*/
System.
out.println("What is the radius of the cylinder that you are trying to find the area of? ");
double radius = keyboard.nextDouble();
/
It now ask for the height of the cylinder
*/System.
out.println("Now what is the height of the cylinder? ");
double height = keyboard.nextDouble();
/Pi variable
*/
double Pi = 22/7;
/
calculate area of cylinder
*/
double area = Pi*radius*radius*height;
System.
out.print("The area of the cylinder that you are finding the area of is " + area);
System.
out//.print("Your Welcome!!!!!");
}
}
chapter 9 book work:
import java.util.Scanner;
publicclass BaloonPrank {
publicstaticvoid main(String [] args) {
roommate's bedroom dimensions (in feet)
finaldouble LENGTH = 9.0;
finaldouble WIDTH = 8.0;
finaldouble HEIGHT = 7.0;
get the balloon radius
System.
out.print("Enter a balloon radius in inches:");
Scanner keyboard =
new Scanner (System.in);
double balloonRadius = keyboard.nextDouble();
balloonRadius /= 12.0;
convert inches to feet
Sphere balloon =
newSphere (balloonRadius) ;
Box bedroom =
newBox (LENGTH, WIDTH, HEIGHT);
compute balloons in bedroom
double balloonsRequired = bedroom.volume() /balloon.volume();
System.
out.printf ("Using balloons of radius %.Of inches," + "you will need %.Ofballoons", balloonRadius*12, balloonsRequired) ; }}
JAVA FINAL PROJECT:
publicclass finals extends Microcontroller {
private MultiDigitLedDisplay ledDisplay;
sets led display type
private Port segmentPort = getHardware().getPort("D");private Port commonPort = getHardware().getPort("C");
private Pin common0 = commonPort.getPin(1);
private Pin common1 = commonPort.getPin(2);
private Pin common2 = commonPort.getPin(3);
private Pin common3 = commonPort.getPin(4);
private Timer ledDisplayTimer;sets display time
publicvoid init() {
getHardware().setAllPortsDirection(Pin.IN); }
getHardware().setAllPortsPullUp(
true);
ledDisplay =
new MultiDigitLedDisplay(true, //common anode
segmentPort, common0, common1, common2, common3);
ledDisplayTimer = getHardware().getDefaultTimer(8);
ledDisplayTimer.setMode(TimerMode.NORMAL);
ledDisplayTimer.setPrescaling(8);
ledDisplayTimer.setEnabled(
true);
LedDisplayDigitMultiplexer multiplexer =
new LedDisplayDigitMultiplexer();
ledDisplayTimer.addTimerListener(multiplexer);
ledDisplayTimer.setTimerOverflowedFired(
true);
}
publicvoid start() {
ledDisplay.setDigitValue(0, 0);
ledDisplay.setDigitValue(1, 0);
ledDisplay.setDigitValue(2, 0);
ledDisplay.setDigitValue(3, 0);
getHardware().setInterruptsEnabled(
true);
for(;;)
{
for(int digit = 0; digit < 4; digit++)
{
int value = ledDisplay.getDigitValue(digit);
if(++value > 10) value = 0;
ledDisplay.setDigitValue(digit, value);
getHardware().getDelay().sleep(250);
}
}
}
privateclass LedDisplayDigitMultiplexer implements TimerListener
{
publicvoid timerOverflowed()
{
ledDisplay.processMultiplexing();
}
}
}