Java Homework - Off-topic

Need help on some java homework. I just started the class, haven't really learned anything and already have an assignment. Don't know much. Can someone point me in the right direction?
Assignment 1
You will use your knowledge of Java programming to create a test program for the seven dwarfs. Let’s pretend that Disney has hired you to make a java program that will test the knowledge of its users. The program will print a positive statement if they are correct and a negative statement if they are wrong. The program will complete the following:
Begin Program
Ask user to pick a valid dwarf from a list (created by you) printed to the user.
- They will pick an integer that represents a dwarf.
- For example, 1. Sleepy, 2. Heathcliff, 3. Joey
After selection the program will print if it is valid dwarf or not
The program will ask the user to pick from a list seven times.
If the user gets all seven selections correct, then a message will print to the user saying you get a gold star
This program can be completed by applying the knowledge learned by using the videos and lecture.

That's a relatively complex assignment for a new class. I wish I could provide you with the appropriate code, but I'm too a beginner and I just thought I'd offer these helpful videos. They're helping me out, and I hope they get you facing the right direction.
http://m.youtube.com/course?list=ECDAA5DE54FB5215EC
Sent from my Galaxy Nexus using Tapatalk 2

Hmm I think I got this -
Code:
// Begin program by importing io
// reinitialize buffered reader
int ans;
int result = 0;
System.out.println("Add your disney question over here whoes correct answer is option #3");
System.out.println("Option 1 - dwarf #1");
System.out.println("Option 2 - dwarf #2");
System.out.println("Option 3 - dwarf #3");
...// do the same till 7
System.out.println("Option 7 - dwarf #7");
// yeah i don't know the name of the dwarf, deal with it!
int ans=Integer.parseInt(br.readLin());
switch (ans)
case 3: System.out.prinltn("youyr answer is correct!");
result ++
break;
default : System.out.println("Your answer is wrong");
break;
// now copy the same set of code from the print till my last break. after doing that 6 more times i.e. 7 question in total, do this
if ( result = 7)
System.out.println("You got a gold star ")'
else
System .out .println("you are dead");
I think this should be enough. All the best! Feel free to PM, i am expert at java programs

^What he said.
Instead of using BufferedReader, I would use the Scanner's nextInt() method, that way you wouldn't have to use the parseInt() method (just personal preference). Also the last "if" statement has to be changed to ==.

DomOctober said:
That's a relatively complex assignment for a new class. I wish I could provide you with the appropriate code, but I'm too a beginner and I just thought I'd offer these helpful videos. They're helping me out, and I hope they get you facing the right direction.
http://m.youtube.com/course?list=ECDAA5DE54FB5215EC
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Thanks man!
ak700 said:
Hmm I think I got this -
Code:
// Begin program by importing io
// reinitialize buffered reader
int ans;
int result = 0;
System.out.println("Add your disney question over here whoes correct answer is option #3");
System.out.println("Option 1 - dwarf #1");
System.out.println("Option 2 - dwarf #2");
System.out.println("Option 3 - dwarf #3");
...// do the same till 7
System.out.println("Option 7 - dwarf #7");
// yeah i don't know the name of the dwarf, deal with it!
int ans=Integer.parseInt(br.readLin());
switch (ans)
case 3: System.out.prinltn("youyr answer is correct!");
result ++
break;
default : System.out.println("Your answer is wrong");
break;
// now copy the same set of code from the print till my last break. after doing that 6 more times i.e. 7 question in total, do this
if ( result = 7)
System.out.println("You got a gold star ")'
else
System .out .println("you are dead");
I think this should be enough. All the best! Feel free to PM, i am expert at java programs
Click to expand...
Click to collapse
slow_DC4 said:
^What he said.
Instead of using BufferedReader, I would use the Scanner's nextInt() method, that way you wouldn't have to use the parseInt() method (just personal preference). Also the last "if" statement has to be changed to ==.
Click to expand...
Click to collapse
I'll definitely try this out when I get home.

ak700 said:
Hmm I think I got this -
Code:
// Begin program by importing io
// reinitialize buffered reader
int ans;
int result = 0;
System.out.println("Add your disney question over here whoes correct answer is option #3");
System.out.println("Option 1 - dwarf #1");
System.out.println("Option 2 - dwarf #2");
System.out.println("Option 3 - dwarf #3");
...// do the same till 7
System.out.println("Option 7 - dwarf #7");
// yeah i don't know the name of the dwarf, deal with it!
int ans=Integer.parseInt(br.readLin());
switch (ans)
case 3: System.out.prinltn("youyr answer is correct!");
result ++
break;
default : System.out.println("Your answer is wrong");
break;
// now copy the same set of code from the print till my last break. after doing that 6 more times i.e. 7 question in total, do this
if ( result = 7)
System.out.println("You got a gold star ")'
else
System .out .println("you are dead");
I think this should be enough. All the best! Feel free to PM, i am expert at java programs
Click to expand...
Click to collapse
It would be "br.readLine()", not br.readLin()"....and == instead of = in 'if' statement....incase you don't know how to import io and initialize BufferedReader, here's the code :-
Code:
import java.io.*;
public class your_class_name
{
public static void main(String args[])throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//rest of the previous code that ak700 wrote
}//end of method
}//end of class
That's it! You've done your homework!

anasdcool71 said:
It would be "br.readLine()", not br.readLin()"....and == instead of = in 'if' statement....incase you don't know how to import io and initialize BufferedReader, here's the code :-
Code:
import java.io.*;
public class your_class_name
{
public static void main(String args[])throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//rest of the previous code that ak700 wrote
}//end of method
}//end of class
That's it! You've done your homework!
Click to expand...
Click to collapse
lol Thanks everyone!

anasdcool71 said:
It would be "br.readLine()", not br.readLin()"....and == instead of = in 'if' statement....incase you don't know how to import io and initialize BufferedReader, here's the code :-
That's it! You've done your homework!
Click to expand...
Click to collapse
Yeah I know. Just gave him a framework outline.

Assignment 1 was submitted. Now onto Assignment 2. I've got the code written, but it is not calculating properly. I've looked it over and it seems good to me.
Can someone tell me what I'm doing wrong?
Problem Description:
The United States federal personal income tax is calculated based on filing status and taxable income. There are four filing statuses: single filers, married filing jointly, married filing separately, and head of household. The tax rates vary every year. Table 1 shows the rates for 2009.
Table 1
2009 U.S. Federal Personal Tax Rates
Marginal Tax Rate
10%
15%
25%
28%
33%
35%
Single
$0 - $8,350 (10%)
$8,351 - $33,950 (15%)
$33,951 - $82,250 (25%)
$82,251 - $171,550 (28%)
$171,551 - $372,950 (33%)
$372,951+ (35%)
Married Filing Jointly or Qualified Widow(er)
$0 - $16,700 (10%)
$16,701 - $67,900 (15%)
$67,901 - $137,050 (25%)
$137,051 - $208,850 (28%)
$208,851 - $372,950 (33%)
$372,951+ (35%)
Married Filing Seperately
Head of Household
//I've only done cases for single and married filing jointly. Married filing jointly is not calculating properly.
Case 1:
Enter the filing status: 0
Enter the taxable income: 100000
Tax is 21720.0
Case 2:
Enter the filing status: 1
Enter the taxable income: 300339
Tax is 78777.87
Code:
import java.io.*;
public class javaAssign2 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter your filing status.");
System.out.println("0: Single");
System.out.println("1: Married filing jointly");
System.out.println("2: Married filing seperately");
System.out.println("3: Head of Household");
int status = Integer.parseInt(br.readLine());
System.out.print("Enter the taxable income: ");
double income = Integer.parseInt(br.readLine());
double tax = 0;
switch (status) {
case 0: {
if (income <= 8350)
tax = income * .10;
if (income > 8351 && income <= 33950)
tax = 8350 * 0.10 + (income - 8350) * 0.15;
if (income > 33950 && income <= 82250)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (income - 33950)
* 0.25;
if (income > 82250 && income <= 171550)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950)
* 0.25 + (income - 82250) * 0.28;
if (income > 171550 && income <= 372950)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950)
* 0.25 + (171550 - 82250) * 0.28 + (income - 171550)
* 0.33;
if (income > 372950)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950)
* 0.25 + (171550 - 82250) * 0.28 + (372950 - 171550)
* 0.33 + (income - 372950) * 0.35;
break;
}
//case 1 is not calculating to the same tax as the test case 1 is.
case 1: {
if (income <= 16700)
tax = income * 0.10;
if (income > 16700 && income <= 67900)
tax = 16700 * 0.10 + (income - 16700) * 0.15;
if (income > 67900 && income <= 137050)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (income - 67900)
* 0.25;
if (income > 137050 && income <= 208850)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (137050 - 67900)
* 0.25 + (income - 137050) * 0.28;
if (income > 208850 && income <= 372950)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (137050 - 67900)
* 0.25 + (208850 - 137050) * 0.28 + (income - 208850)
* 0.33;
if (income > 372950)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (137050 - 67900)
* 0.25 + (208850 - 137050) * 0.28 + (372950 - 208850)
* 0.33 + (income - 372950) * 0.35;
break;
}
}
System.out.println("Tax is " + tax);
}
}
plus there has to be a shorter way of doing all that math.
.

Enraged21 said:
Assignment 1 was submitted. Now onto Assignment 2. I've got the code written, but it is not calculating properly. I've looked it over and it seems good to me.
Can someone tell me what I'm doing wrong?
Problem Description:
The United States federal personal income tax is calculated based on filing status and taxable income. There are four filing statuses: single filers, married filing jointly, married filing separately, and head of household. The tax rates vary every year. Table 1 shows the rates for 2009.
Table 1
2009 U.S. Federal Personal Tax Rates
Marginal Tax Rate
10%
15%
25%
28%
33%
35%
Single
$0 - $8,350 (10%)
$8,351 - $33,950 (15%)
$33,951 - $82,250 (25%)
$82,251 - $171,550 (28%)
$171,551 - $372,950 (33%)
$372,951+ (35%)
Married Filing Jointly or Qualified Widow(er)
$0 - $16,700 (10%)
$16,701 - $67,900 (15%)
$67,901 - $137,050 (25%)
$137,051 - $208,850 (28%)
$208,851 - $372,950 (33%)
$372,951+ (35%)
Married Filing Seperately
Head of Household
//I've only done cases for single and married filing jointly. Married filing jointly is not calculating properly.
Case 1:
Enter the filing status: 0
Enter the taxable income: 100000
Tax is 21720.0
Case 2:
Enter the filing status: 1
Enter the taxable income: 300339
Tax is 78777.87
Code:
import java.io.*;
public class javaAssign2 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter your filing status.");
System.out.println("0: Single");
System.out.println("1: Married filing jointly");
System.out.println("2: Married filing seperately");
System.out.println("3: Head of Household");
int status = Integer.parseInt(br.readLine());
System.out.print("Enter the taxable income: ");
double income = Integer.parseInt(br.readLine());
double tax = 0;
switch (status) {
case 0: {
if (income <= 8350)
tax = income * .10;
if (income > 8351 && income <= 33950)
tax = 8350 * 0.10 + (income - 8350) * 0.15;
if (income > 33950 && income <= 82250)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (income - 33950)
* 0.25;
if (income > 82250 && income <= 171550)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950)
* 0.25 + (income - 82250) * 0.28;
if (income > 171550 && income <= 372950)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950)
* 0.25 + (171550 - 82250) * 0.28 + (income - 171550)
* 0.33;
if (income > 372950)
tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950)
* 0.25 + (171550 - 82250) * 0.28 + (372950 - 171550)
* 0.33 + (income - 372950) * 0.35;
break;
}
//case 1 is not calculating to the same tax as the test case 1 is.
case 1: {
if (income <= 16700)
tax = income * 0.10;
if (income > 16700 && income <= 67900)
tax = 16700 * 0.10 + (income - 16700) * 0.15;
if (income > 67900 && income <= 137050)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (income - 67900)
* 0.25;
if (income > 137050 && income <= 208850)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (137050 - 67900)
* 0.25 + (income - 137050) * 0.28;
if (income > 208850 && income <= 372950)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (137050 - 67900)
* 0.25 + (208850 - 137050) * 0.28 + (income - 208850)
* 0.33;
if (income > 372950)
tax = 16700 * 0.10 + (67900 - 16700) * 0.15 + (137050 - 67900)
* 0.25 + (208850 - 137050) * 0.28 + (372950 - 208850)
* 0.33 + (income - 372950) * 0.35;
break;
}
}
System.out.println("Tax is " + tax);
}
}
plus there has to be a shorter way of doing all that math.
.
Click to expand...
Click to collapse
Don't open {} for 'case'....
Sent from my GT-I9100 using xda app-developers app

anasdcool71 said:
Don't open {} for 'case'....
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
I don't think that made a difference.
Plus case 1 is still computing wrong and I can't figure out why.
I formatted it the same way as case 0.

I think i got it. Use 'else if' after the first 'if', instead of so many 'if blocks. And why are you adding the previous tax in each 'if' statement?
Code:
System.out.println("Sent from my SGY");

anasdcool71 said:
I think i got it. Use 'else if' after the first 'if', instead of so many 'if blocks. And why are you adding the previous tax in each 'if' statement?
Code:
System.out.println("Sent from my SGY");
Click to expand...
Click to collapse
It wouldn't compute any other way
Sent from my PG86100 using xda app-developers app

same problem still. Not computing case 1 properly.
Enter test case: 1
Enter taxable amount: $300339
Tax is: $76,932.87 (When it should be $78,777.87)
So I'm only off by a little

Bump
Sent from my PG86100 using xda app-developers app

Have a look at this:
http://www.maxi-pedia.com/tax+rates+2009+schedule+table
Mainly the part after the tax calculator.
You only need to calculate the tax for the last unfilled tax band. The tax due for the lower filled tax band(s) is a fixed amount.
The tax owed on 300339 is (300339-171550) * 0.33 + 41754.00 = 84254.37
Try it in the calculator on the page above.
41754.00 is the sum of the tax due on the 10% to 28% bands.
Which is:
Code:
10% 835.00
15% 3840.00
25% 12075.00
28% 25004.00

I'm on to Assignment 4. Its on the Luhn Validating Credit Cards.
Issue i'm having with this assignment is no matter what test cases I run, each Credit Card number I test is coming out valid when at least one of them should be invalid.
Here's the code:
Code:
import java.util.Scanner;
public class javaAssign4 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter Credit Card number: ");
long ccNum = input.nextLong();
int number = 0;
long total = sumEven(number) + sumOdd(number);
if (isValid(total)) {
System.out.println("The Credit Card number is valid.");
} else
System.out.println("The Credit Card number is invalid.");
}
public static boolean isValid(long total) {
if (total % 10 == 0) {
return true;
}
return false;
}
public static int sumEven(long number) {
int sum = 0;
int remainder;
number %= 10;
while (number % 10 != 0 || number / 10 != 0) {
remainder = (int) (number % 10);
sum += sumResult(remainder * 2);
number /= 100;
}
return sum;
}
public static int sumResult(int number) {
if (number > 9) {
return (number % 10 + number / 10);
}
return number;
}
public static int sumOdd(long number) {
int sum = 0;
int remainder;
while (number % 10 != 0 || number / 10 != 0) {
remainder = (int) (number % 10);
sum += sumResult(remainder);
number /= 100;
}
return sum;
}
}
Here are the test cases:
Case 1:
Enter a credit card number as a long integer: 4246345689049834
4246345689049834 is invalid
Case 2:
Enter a credit card number as a long integer: 4388576018410707
4388576018410707 is valid

Try using 'if' instead of 'while' and divide by 2 to determine if the number is odd or not.
sent from the....

shanman-2 said:
Try using 'if' instead of 'while' and divide by 2 to determine if the number is odd or not.
sent from the....
Click to expand...
Click to collapse
Tried. Can't seem to get it right.

Java Programming
Assignment 4
Project: Validating Credit Cards
Problem Description:
Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits. It must start with:
4 for Visa cards
5 for Master cards
37 for American Express cards
6 for Discover cards
In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers. The algorithm is useful to determine if a card number is entered correctly or if a credit card is scanned correctly by a scanner. Almost all credit card numbers are generated following this validity check, commonly known as the Luhn check or the Mod 10 check, which can be described as follows (for illustration, consider the card number 4388576018402626):
1. Double every second digit from right to left. If doubling of a digit results in a two-digit number, add up the two digits to get a single-digit number.
2 * 2 = 4
2 * 2 = 4
4 * 2 = 8
1 * 2 = 2
6 * 2 = 12 (1 + 2 = 3)
5 * 2 = 10 (1 + 0 = 1)
8 * 2 = 16 (1 + 6 = 7)
4 * 2 = 8
2. Now add all single-digit numbers from Step 1.
4 + 4 + 8 + 2 + 3 + 1 + 7 + 8 = 37
3. Add all digits in the odd places from right to left in the card number.
6 + 6 + 0 + 8 + 0 + 7 + 8 + 3 = 38
4. Sum the results from Step 2 and Step 3.
37 + 38 = 75
5. If the result from Step 4 is divisible by 10, the card number is valid; otherwise, it is invalid. For example, the number 4388576018402626 is invalid, but the number 4388576018410707 is valid.
Write a program that prompts the user to enter a credit card number as a long integer. Display whether the number is valid or invalid.
_______________________________________________________________________________________________________
Here's the program if that would help someone help me.
I'm still completely lost here.

Related

Java...HELP!

For homework, we're required to write code for a cash register. Basically what it does is it prints out a menu and asks the user for input. At the end it prints out the order along with the total.
The part I am having trouble with is how do I make something like this:
Code:
Hamburger Hamburger Hamburger
display as this:
Code:
(3) Hamburger
We're told to think in terms of parallel arrays, but seeing as I missed that class, I am a bit lost.
If wanted, I can put up what code I have.
Thanks in advance.
can you post all your code?
Here is what I have.
I haven't written anything in my code that would relate to the problem I am having because I do not know where to start.
Code:
import java.util.Scanner;
import java.util.ArrayList;
public class CashRegister{
public static void main(String[]args){
Scanner scan=new Scanner(System.in);
ArrayList<String> list=new ArrayList<String>();
Register reg=new Register();
int b;
do{
String [] item = new String[11];
item [0]="Hot Dog";
item [1]="Hamburger";
item [2]="Soda";
item [3]="Chips";
item [4]="Ice Cream";
item [5]="Shave Ice";
item [6]="Cookie";
item [7]="Plate Lunch";
item [8]="French Fries";
item [9]="Shake";
item [10]="Order Complete";
for (int a=0;a<item.length;a++){
System.out.println((a+1)+". "+item[a]);}
b=scan.nextInt();
if (b==1){
list.add(item[0]);
reg.add(2.50);}
if (b==2){
list.add(item[1]);
reg.add(3.00);}
if (b==3){
list.add(item[2]);
reg.add(1.25);}
if (b==4){
list.add(item[3]);
reg.add(1.50);}
if (b==5){
list.add(item[4]);
reg.add(2.00);}
if (b==6){
list.add(item[5]);
reg.add(2.00);}
if (b==7){
list.add(item[6]);
reg.add(1.00);}
if (b==8){
list.add(item[7]);
reg.add(5.00);}
if (b==9){
list.add(item[8]);
reg.add(2.50);}
if (b==10){
list.add(item[9]);
reg.add(3.00);}
}
while (b != 11);
System.out.println("");
System.out.println("Your order contains: ");
System.out.println(list);
System.out.print("Your order costs: $");
double f=reg.getTotal();
System.out.format("%.2f %n",f);
}}
class Register{
double total=0;
public void add (double b){
total=total+b;}
public double getTotal(){
return total;}
}
I looked into your code and I can see what you want to do. I came up with a way to do it, however, I don't think it will be an efficient code (I'm not really familiar with Java).
I'm sure someone with more knowledge with Java could help you with this.
If you don't mind, could you post what you came up with or maybe point me in the right direction? Thanks
Sent from 234 Elm Street
We're told to think in terms of parallel arrays, but seeing as I missed that class, I am a bit lost.
If wanted, I can put up what code I have.
Thanks in advance.
Click to expand...
Click to collapse
Woops! I haven't read that, here is the almost much more cleaner solution.
There are several things that could be done (checking for valid input for example, ...) but i think thats to much for now.
Code:
import java.util.ArrayList;
import java.util.Scanner;
public class CashRegister {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
ArrayList<String> order = new ArrayList<String>();
Register reg = new Register();
// init & declare the array outside the loop
String[] menu = new String[] { "Hot Dog", "Hamburger", "Soda", "Chips",
"Ice Cream", "Shave Ice", "Cookie", "Plate Lunch",
"French Fries", "Shake" };
double[] prices = new double[] { 2.50, 3.00, 1.25, 1.50, 2.00, 2.00,
1.00, 5.00, 2.50, 3.00 };
// every order contains a amount int
int[] amountOf = new int[10];
for (int a = 0; a < menu.length; a++) {
System.out.println((a) + ". " + menu[a]);
}
System.out.println("10. " + "Order Complete");
System.out.print("Please choose from the menu:");
int input;
do {
input = scan.nextInt();
if (input >= 0 && input <= 10) {
reg.add(prices[input]);
amountOf[input]++;
}
}
while (input != 11);
System.out.println("");
System.out.println("Your order contains: ");
// System.out.println(list);
// calculate the amount of items from the order
for (int singleItem = 0; singleItem < menu.length; singleItem++) {
for (int menuIndex = 0; menuIndex < order.size(); menuIndex++) {
if (order.get(menuIndex).equals(menu[singleItem])) {
amountOf[singleItem]++;
}
}
}
// print the receipt
for (int i = 0; i < amountOf.length; i++) {
if (amountOf[i] > 0) {
System.out.println("(" + amountOf[i] + ") " + menu[i]);
}
}
System.out.print("Your order costs: $");
double f = reg.getTotal();
System.out.format("%.2f %n", f);
}
}
class Register {
private double total = 0;
public void add(double b) {
total = total + b;
}
public double getTotal() {
return total;
}
}
Thanks for your help. Now I can rest until the next assignment...which is tonight.
slow_DC4 said:
Thanks for your help. Now I can rest until the next assignment...which is tonight.
Click to expand...
Click to collapse
You know where to ask
Hi, sadly, it's me again seeking for some help.
This is what we are supposed to do
Code:
In this assignment you will use the techniques you used in lab to create an interactive vending machine. You must use Arraylists to store the information about the items for sale in the machine. Use the class you created in Assignment 5 in your ArrayLists.
Only the first item in a slot can be sold.
Hint:
Declaring and ArrayList of ArrayLists
Where Type is your class:
ArrayList<ArrayList<Type>> array;
You must also add each ArrayList to the ArrayList
array.add(new ArrayList<Type>());
End Hint
All Methods listed should be public:
Items will follow the restrictions delineated in Assignment 5. (You should leverage the abilities built into that class)
You will create a VendingMachine class that has at least the following methods:
VendingMachine(int numSlots, int maxItems)
This constructor will set up the object so that numSlots is the number of slots the machine has. MaxItems will be the maximum number of items that can be placed in each slot.
void menu()
This method will print a list of the items available, their price and the slot it is in. Only the first item in a slot will be printed. If a slot is Empty “Empty” should be printed with $0.00 for the price. Will also print out the current amount held in the machine.
boolean load(int slotNum, String name, double price, int quantity)
This method will load items into the machine. slotNum will be the slot that the items will be placed in, name will be the name of the item in the machine and price the price. Quantity is the number of this item that should be added. If the quantity exceeds the current capacity of the slot it should add nothing to the slot and return false. If the loading is successful return true.
int capacity(int slotNum)
returns the number of spaces empty in the slot specified.
void insertMoney( double money)
Will increase the amount of money in the machine by the amount of money (will not do anything if money is negative)
double returnMoney()
Will set amount of money in the machine to 0 and return the amount that was in the machine.
boolean select(int slotNumber)
Attempts to purchase the item in the slotnumber selected it returns true if the sale was successful and false if it was not. For a successful sale the amount held in the machine must be greater than the selected item. There must also be a valid item to be sold (the slot is not empty). If the item is sold the amount in the machine should be decreased by the price of the item. The first items in the slot should be removed.
This is what I have:
Code:
import java.util.ArrayList;
class itemVend{
public String item;
public double price;
final double maxPrice=99.99;
public itemVend(String item, double price){
this.item=item;
this.price=price;
}
public String getItem(){
if (item.length()>20){
item=item.substring(0,20);
}
System.out.println(item);
return item;
}
public double getPrice(){
if (price>=100.00){
price=99.99;
}
String priceNormal=String.format("%.2f",price);
System.out.format("$%5s",priceNormal);
double nPrice=Double.valueOf(priceNormal);
return nPrice;
}
}
class VendingMachine{
int numSlots;
int maxItems;
int slotNum;
String name;
double price;
int quantity;
double total;
double money;
int [] NumSlot=new int[numSlots];
int [] SlotAdd=new int [maxItems];
ArrayList<ArrayList<VendingMachine>> VendM;
public VendingMachine(int numSlots, int maxItems){
this.numSlots=numSlots;
this.maxItems=maxItems;
}
/*
public void menu(){
for (int x=0;x<numSlots;x++){
System.out.print(NumSlot[x]+","+name+","+price);
}
}
*/
public boolean load (int slotNum, String name, double price,int quantity){
if (quantity<=maxItems){
this.slotNum=slotNum;
this.name=name;
this.price=price;
itemVend IV=new itemVend(name,price);
this.quantity=quantity;
return true;
}
else {
return false;
}
}
public int capacity (int slotNum){
int emptySpace=maxItems-quantity;
return emptySpace;
}
public void insertMoney (double money){
total=total+money;
}
public boolean select(int slotNum){
if ((money>price)){
total=total-price;
return true;
}
else {
return false;
}
}
}
It's not quite done yet, and I'm sure that I have a lot of errors, because I am getting a little frustrated. The parts that I am having the most difficulty with is the VendingMachine constructor and the printing of the menu. Also I don't understand how the hint applies.
I think I may have figured out the menu problem:
Code:
public void menu(){
for (int x=0;x<VendNumber.size();x++){
System.out.println("Slot number: "+VendNumber.get(x)+", Item Name: "+VendItemName.get(x)+", Item Price: $"+ItemPrice.get(x));
}
}
Assignment 5 refers to the itemVend class.
Thanks in advance.
I'll take a look at this at the weekend, maybe tomorrow.

Disable magnetic screen on/off sensor

Hi,
I believe the title says it all. I tried to find the solution here but without success. While Im satisfied with my Nexus 7 case, I found out that sometimes if I just close it and put the tablet into bag it fails to turn the screen off. So, Id prefer to do that manually.
Is there a software way to disable the magnetic sensor? I dont want to play tailor with my case ...
Just manually turn it off. Closing the case won't turn your screen back on...
If the problem is that as the tab shuffles around in your bag and the case cover opens just enough to turn it back on, that's a different issue. Then you'll need some type of band or something to put around it.
Sent from my Nexus 7 using Tapatalk 2
Thanks, that will do. :good: But is there really NO sw way to disable it? I dont like automatic functions just lying around ...
michalurban said:
Thanks, that will do. :good: But is there really NO sw way to disable it? I dont like automatic functions just lying around ...
Click to expand...
Click to collapse
Unless you find a way in the code to disable it or figure out how to physically remove it.
or... just get a case with out a magnet in it.
knitler said:
Unless you find a way in the code to disable it or figure out how to physically remove it.
or... just get a case with out a magnet in it.
Click to expand...
Click to collapse
Ive been hoping in someone else finding the way to disable it in the code. Anyway, I guess Ill get another case and see ... THX! :good:
michalurban said:
Ive been hoping in someone else finding the way to disable it in the code. Anyway, I guess Ill get another case and see ... THX! :good:
Click to expand...
Click to collapse
Until seeing it on youtube, I wasn't even aware of this feature. The amazing thing to me is the fact that the actual case sold for the N7 at the google store does not have this feature (ie. no magnet)......
Im afraid I took the matters into my own hands and solved my magnetic problem once and for all ... :laugh:
michalurban said:
Im afraid I took the matters into my own hands and solved my magnetic problem once and for all ... :laugh:
Click to expand...
Click to collapse
Your case isn't nearly as attractive now.
Seriously, I can't see how this was a real issue unless your case was designed badly. Example; some flip-around cases if not shielded will turn the N7 off when flipped around.
khaytsus said:
Your case isn't nearly as attractive now.
Seriously, I can't see how this was a real issue unless your case was designed badly. Example; some flip-around cases if not shielded will turn the N7 off when flipped around.
Click to expand...
Click to collapse
Well, small hole inside the case isnt a big deal for me. Anyway, the problem was that the case managed to turn the tablet off only when closed really good. And if closed, only a few milimeters (say 2) of movement of the front cover to the left made the case wake my N7. I couldnt really be sure what would the Thing do in my bag - but the case itself is good, co I kept it this way.
This can be done strictly via software. Here is a modified version of the kernel driver from drivers/input/lid.c that allows you to enable/disable this feature. By default, it acts normally. To disable the magnetic switch, do "echo 0 > /sys/module/lid/parameters/lid_enabled", or use any other app you want to write to that file. To enable it again, just write a non-zero value to the parameter. Ive only tested it on my nexus7, but it seems to work perfectly.
Code:
/*
* ASUS Lid driver.
*/
#include <linux/module.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>
#include <linux/gpio_event.h>
#include <asm/gpio.h>
#include <../gpio-names.h>
#include "lid.h"
MODULE_DESCRIPTION(DRIVER_LID);
MODULE_LICENSE("GPL");
/*
* functions declaration
*/
static void lid_report_function(struct work_struct *dat);
static int lid_input_device_create(void);
static ssize_t show_lid_status(struct device *class, struct device_attribute *attr,char *buf);
/*
* global variable
*/
static unsigned int hall_sensor_gpio = TEGRA_GPIO_PS6;
static struct workqueue_struct *lid_wq;
static struct input_dev *lid_indev;
static struct platform_device *lid_dev; /* Device structure */
// to allow enabling/disabling the lid switch
static int lid_enabled = 1;
module_param( lid_enabled, int, 0644 );
static DEVICE_ATTR(lid_status, S_IWUSR | S_IRUGO, show_lid_status,NULL);
/* Attribute Descriptor */
static struct attribute *lid_attrs[] = {
&dev_attr_lid_status.attr,
NULL
};
/* Attribute group */
static struct attribute_group lid_attr_group = {
.attrs = lid_attrs,
};
static ssize_t show_lid_status(struct device *class,struct device_attribute *attr,char *buf)
{
return sprintf(buf, "%d\n", gpio_get_value(hall_sensor_gpio));
}
static irqreturn_t lid_interrupt_handler(int irq, void *dev_id){
if( lid_enabled )
{
int gpio = irq_to_gpio(irq);
if (gpio == hall_sensor_gpio){
LID_NOTICE("LID interrupt handler...gpio: %d..\n", gpio_get_value(hall_sensor_gpio));
queue_delayed_work(lid_wq, &lid_hall_sensor_work, 0);
}
}
else
{
printk( "lid: ignoring irq\n" );
}
return IRQ_HANDLED;
}
static int lid_irq_hall_sensor(void)
{
int rc = 0 ;
unsigned gpio = hall_sensor_gpio;
unsigned irq = gpio_to_irq(hall_sensor_gpio);
const char* label = "hall_sensor" ;
LID_INFO("gpio = %d, irq = %d\n", gpio, irq);
LID_INFO("GPIO = %d , state = %d\n", gpio, gpio_get_value(gpio));
tegra_gpio_enable(gpio);
rc = gpio_request(gpio, label);
if (rc) {
LID_ERR("gpio_request failed for input %d\n", gpio);
}
rc = gpio_direction_input(gpio) ;
if (rc) {
LID_ERR("gpio_direction_input failed for input %d\n", gpio);
goto err_gpio_direction_input_failed;
}
LID_INFO("GPIO = %d , state = %d\n", gpio, gpio_get_value(gpio));
rc = request_irq(irq, lid_interrupt_handler,IRQF_TRIGGER_RISING|IRQF_TRIGGER_FALLING, label, lid_indev);
if (rc < 0) {
LID_ERR("Could not register for %s interrupt, irq = %d, rc = %d\n", label, irq, rc);
rc = -EIO;
goto err_gpio_request_irq_fail ;
}
enable_irq_wake(irq);
LID_INFO("LID irq = %d, rc = %d\n", irq, rc);
return 0 ;
err_gpio_request_irq_fail :
gpio_free(gpio);
err_gpio_direction_input_failed:
return rc;
}
static void lid_report_function(struct work_struct *dat)
{
int value = 0;
if (lid_indev == NULL){
LID_ERR("LID input device doesn't exist\n");
return;
}
msleep(CONVERSION_TIME_MS);
value = gpio_get_value(hall_sensor_gpio);
if(value)
input_report_switch(lid_indev, SW_LID, 0);
else
input_report_switch(lid_indev, SW_LID, 1);
input_sync(lid_indev);
LID_NOTICE("SW_LID report value = %d\n", value);
}
static int lid_input_device_create(void){
int err = 0;
lid_indev = input_allocate_device();
if (!lid_indev) {
LID_ERR("lid_indev allocation fails\n");
err = -ENOMEM;
goto exit;
}
lid_indev->name = "lid_input";
lid_indev->phys = "/dev/input/lid_indev";
set_bit(EV_SW, lid_indev->evbit);
set_bit(SW_LID, lid_indev->swbit);
err = input_register_device(lid_indev);
if (err) {
LID_ERR("lid_indev registration fails\n");
goto exit_input_free;
}
return 0;
exit_input_free:
input_free_device(lid_indev);
lid_indev = NULL;
exit:
return err;
}
static int __init lid_init(void)
{
int err_code = 0;
printk(KERN_INFO "%s+ #####\n", __func__);
LID_NOTICE("start LID init.....\n");
lid_dev = platform_device_register_simple("LID", -1, NULL, 0);
if (!lid_dev){
printk ("LID_init: error\n");
return -ENOMEM;
}
sysfs_create_group((struct kobject*)&lid_dev->dev.kobj, &lid_attr_group);
err_code = lid_input_device_create();
if(err_code != 0)
return err_code;
lid_wq = create_singlethread_workqueue("lid_wq");
INIT_DELAYED_WORK_DEFERRABLE(&lid_hall_sensor_work, lid_report_function);
lid_irq_hall_sensor();
return 0;
}
static void __exit lid_exit(void)
{
input_unregister_device(lid_indev);
sysfs_remove_group(&lid_dev->dev.kobj, &lid_attr_group);
platform_device_unregister(lid_dev);
}
module_init(lid_init);
module_exit(lid_exit);
So how would one go about implementing this modified code? Personally, I can't believe that there is not a standard setting to enable/disable this feature, but it ROM developers and/or users can implement this modified code easily, that would be a big help!
Thanks.
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2
jtrosky said:
So how would one go about implementing this modified code? Personally, I can't believe that there is not a standard setting to enable/disable this feature, but it ROM developers and/or users can implement this modified code easily, that would be a big help!
Thanks.
Click to expand...
Click to collapse
To disable the magnetic switch, do "echo 0 > /sys/module/lid/parameters/lid_enabled"
Click to expand...
Click to collapse
The code was for reference. EDIT: No it's not, I'm an idiot.
Not the way I read it. The modified code has to be built into a kernel to access the option file.
Sent from my Nexus 7 using xda app-developers app
Yes, this is one of the files that make up the kernel, with about 10 lines added to it. You would have to replace the file in the kernel source code, build the kernel, insert that kernel into a boot.img, and flash it to your tablet. If you can't manage all that, then you could pester the person who does make the kernel you're using to add it.
rmm200 said:
Not the way I read it. The modified code has to be built into a kernel to access the option file.
Click to expand...
Click to collapse
This is what I get for reading things too fast.. Ah well.
gianptune said:
This can be done strictly via software. Here is a modified version of the kernel driver from drivers/input/lid.c that allows you to enable/disable this feature. By default, it acts normally. To disable the magnetic switch, do "echo 0 > /sys/module/lid/parameters/lid_enabled", or use any other app you want to write to that file. To enable it again, just write a non-zero value to the parameter. Ive only tested it on my nexus7, but it seems to work perfectly.
Code:
/*
* ASUS Lid driver.
*/
#include <linux/module.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>
#include <linux/gpio_event.h>
#include <asm/gpio.h>
#include <../gpio-names.h>
#include "lid.h"
MODULE_DESCRIPTION(DRIVER_LID);
MODULE_LICENSE("GPL");
/*
* functions declaration
*/
static void lid_report_function(struct work_struct *dat);
static int lid_input_device_create(void);
static ssize_t show_lid_status(struct device *class, struct device_attribute *attr,char *buf);
/*
* global variable
*/
static unsigned int hall_sensor_gpio = TEGRA_GPIO_PS6;
static struct workqueue_struct *lid_wq;
static struct input_dev *lid_indev;
static struct platform_device *lid_dev; /* Device structure */
// to allow enabling/disabling the lid switch
static int lid_enabled = 1;
module_param( lid_enabled, int, 0644 );
static DEVICE_ATTR(lid_status, S_IWUSR | S_IRUGO, show_lid_status,NULL);
/* Attribute Descriptor */
static struct attribute *lid_attrs[] = {
&dev_attr_lid_status.attr,
NULL
};
/* Attribute group */
static struct attribute_group lid_attr_group = {
.attrs = lid_attrs,
};
static ssize_t show_lid_status(struct device *class,struct device_attribute *attr,char *buf)
{
return sprintf(buf, "%d\n", gpio_get_value(hall_sensor_gpio));
}
static irqreturn_t lid_interrupt_handler(int irq, void *dev_id){
if( lid_enabled )
{
int gpio = irq_to_gpio(irq);
if (gpio == hall_sensor_gpio){
LID_NOTICE("LID interrupt handler...gpio: %d..\n", gpio_get_value(hall_sensor_gpio));
queue_delayed_work(lid_wq, &lid_hall_sensor_work, 0);
}
}
else
{
printk( "lid: ignoring irq\n" );
}
return IRQ_HANDLED;
}
static int lid_irq_hall_sensor(void)
{
int rc = 0 ;
unsigned gpio = hall_sensor_gpio;
unsigned irq = gpio_to_irq(hall_sensor_gpio);
const char* label = "hall_sensor" ;
LID_INFO("gpio = %d, irq = %d\n", gpio, irq);
LID_INFO("GPIO = %d , state = %d\n", gpio, gpio_get_value(gpio));
tegra_gpio_enable(gpio);
rc = gpio_request(gpio, label);
if (rc) {
LID_ERR("gpio_request failed for input %d\n", gpio);
}
rc = gpio_direction_input(gpio) ;
if (rc) {
LID_ERR("gpio_direction_input failed for input %d\n", gpio);
goto err_gpio_direction_input_failed;
}
LID_INFO("GPIO = %d , state = %d\n", gpio, gpio_get_value(gpio));
rc = request_irq(irq, lid_interrupt_handler,IRQF_TRIGGER_RISING|IRQF_TRIGGER_FALLING, label, lid_indev);
if (rc < 0) {
LID_ERR("Could not register for %s interrupt, irq = %d, rc = %d\n", label, irq, rc);
rc = -EIO;
goto err_gpio_request_irq_fail ;
}
enable_irq_wake(irq);
LID_INFO("LID irq = %d, rc = %d\n", irq, rc);
return 0 ;
err_gpio_request_irq_fail :
gpio_free(gpio);
err_gpio_direction_input_failed:
return rc;
}
static void lid_report_function(struct work_struct *dat)
{
int value = 0;
if (lid_indev == NULL){
LID_ERR("LID input device doesn't exist\n");
return;
}
msleep(CONVERSION_TIME_MS);
value = gpio_get_value(hall_sensor_gpio);
if(value)
input_report_switch(lid_indev, SW_LID, 0);
else
input_report_switch(lid_indev, SW_LID, 1);
input_sync(lid_indev);
LID_NOTICE("SW_LID report value = %d\n", value);
}
static int lid_input_device_create(void){
int err = 0;
lid_indev = input_allocate_device();
if (!lid_indev) {
LID_ERR("lid_indev allocation fails\n");
err = -ENOMEM;
goto exit;
}
lid_indev->name = "lid_input";
lid_indev->phys = "/dev/input/lid_indev";
set_bit(EV_SW, lid_indev->evbit);
set_bit(SW_LID, lid_indev->swbit);
err = input_register_device(lid_indev);
if (err) {
LID_ERR("lid_indev registration fails\n");
goto exit_input_free;
}
return 0;
exit_input_free:
input_free_device(lid_indev);
lid_indev = NULL;
exit:
return err;
}
static int __init lid_init(void)
{
int err_code = 0;
printk(KERN_INFO "%s+ #####\n", __func__);
LID_NOTICE("start LID init.....\n");
lid_dev = platform_device_register_simple("LID", -1, NULL, 0);
if (!lid_dev){
printk ("LID_init: error\n");
return -ENOMEM;
}
sysfs_create_group((struct kobject*)&lid_dev->dev.kobj, &lid_attr_group);
err_code = lid_input_device_create();
if(err_code != 0)
return err_code;
lid_wq = create_singlethread_workqueue("lid_wq");
INIT_DELAYED_WORK_DEFERRABLE(&lid_hall_sensor_work, lid_report_function);
lid_irq_hall_sensor();
return 0;
}
static void __exit lid_exit(void)
{
input_unregister_device(lid_indev);
sysfs_remove_group(&lid_dev->dev.kobj, &lid_attr_group);
platform_device_unregister(lid_dev);
}
module_init(lid_init);
module_exit(lid_exit);
Click to expand...
Click to collapse
im interested in trying this on the sprint GS4.
can you possibly be a little more detailed on what i need to do?
thank you very much.
In my opinion the best solution to this problem is two steps:
1) Remove any magnet in the case cover. Disables smart cover feature physically rather than software.
2) Use NFC tags with programs configured to control exactly the items needed, e.g. sleep mode, settings, wi-fi, etc.
This may require two to four NFC tags, one for each major scenario. These might be "deep sleep, battery save", "sleep with fast restore", "wake no communicate", "wake and communication", etc. You could put the tags on a strip of material along with color codes. Touch the tag to the NFC sensor and no messing around.
As others may notice, I attended the XDA dev conference. LOL
As I know all magnetic cases or stuffs are harmful for mobile phones or tablets...
By the way do you guys think that, can this little magnet in the case ، hurm n7 in the long term ?
Xposed Module
Somebody made a Xposed module for the Moto G that disables the magnetic lock.
It could work on the N7, but i dont have a smart cover to try.
http://forum.xda-developers.com/showthread.php?t=2621807
sasa31 said:
As I know all magnetic cases or stuffs are harmful for mobile phones or tablets...
By the way do you guys think that, can this little magnet in the case ، hurm n7 in the long term ?
Click to expand...
Click to collapse
I ordered my N7 during the IO in which it was announced. Been in a magnetic case since then, so about a year and a half. What do you "know" is harmful? A static magnetic field is unlikely to harm solid state electronics or affect their operation.
Sent from my SCH-I545 using Tapatalk

Calling an alarm after DispatcherTimer reaches 0

I'm developing an app with a count down time and I'm looking for a way to tie into the built in alarm sounds, or at least a way to set one programmatically,
Anyone ideas?
I'm using the DispatcherTimer for counting ticks.
Example code below:
Code:
if (remaining.TotalSeconds <= 0)
{
this._dispatcherTimer.Stop();
// Alarm callingmethod goes here
}
dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0,0,1);
dispatcherTimer.Start();
// System.Windows.Threading.DispatcherTimer.Tick handler
//
// Updates the current seconds display and calls
// InvalidateRequerySuggested on the CommandManager to force
// the Command to raise the CanExecuteChanged event.
private void dispatcherTimer_Tick(object sender, EventArgs e)
{
dispatcherTimer.Stop();
// Call alarm here
}
No, I need to know how to call the alarm sound. The example I showed was how it was going to be called.
The app is completed, except for this little extra I would like to add.
Code:
var alarm = new Alarm(name);
alarm.Content = content;
alarm.Sound = new Uri("/Ringtones/Ring01.wma", UriKind.Relative);
alarm.BeginTime = beginTime;
alarm.ExpirationTime = expirationTime;
alarm.RecurrenceType = RecurrenceInterval.None;
ScheduledActionService.Add(alarm);
Useless guy said:
Code:
var alarm = new Alarm(name);
alarm.Content = content;
alarm.Sound = new Uri("/Ringtones/Ring01.wma", UriKind.Relative);
alarm.BeginTime = beginTime;
alarm.ExpirationTime = expirationTime;
alarm.RecurrenceType = RecurrenceInterval.None;
ScheduledActionService.Add(alarm);
Click to expand...
Click to collapse
I'll let you know how it works ... thanks.

How do you get the number of items in a spinner control

I am trying to use m_BTArrayAdapter.getCount()
However this function returns 0 regardless of what is in the spinner popup.
I found some doco on this function: http://developer.android.com/reference/android/widget/ArrayAdapter.html#getCount%28%29
"public int getCount ()"
That is - no description. So what does that mean? In android Studio this function is redundant?
There are no other functions that I can see that tell you how many items there are in an ArrayAdapter or in the spinner control itself.
Surely I don't have to resort to a counter in my BT listener function to keep count of how many items are added to the adapter????
Code:
void setupBTListener()
{
m_BTArrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item);
final Spinner spinnerBluetooth = (Spinner)findViewById(id.spinner_bluetooth);
spinnerBluetooth.setAdapter(m_BTArrayAdapter);
Can anyone explain to me why m_BTArrayAdapter.getCount() returns non zero inside my listener function but zero in the code below?
Code:
m_BTArrayAdapter.clear();
if (m_BTAdapter.isDiscovering())
m_BTAdapter.cancelDiscovery();
m_BTAdapter.startDiscovery();
long longStart = System.currentTimeMillis(),
longTimer;
boolean bDone = false;
while (m_BTAdapter.isDiscovering() && !bDone)
{
longTimer = System.currentTimeMillis();
//bDone = (longTimer - longStart) < 5000;
}
bEnable = m_BTArrayAdapter.getCount() > 0;
spinnerBluetooth.setEnabled(bEnable);
buttonConnect.setEnabled(bEnable);
buttonSearch.setEnabled(true);

BaseMaps

So Ive Had a Long Experience with Converting Standard Earth Time to 100 from 60 and had came up with a new Schematic to Convert A basic BaseMap to Help find my Solution as I have 4+ years researching Numbers and Conversion Methods from -60 to 100 at a -Time Rate = to Earths Current Age and the Age in which the Planet is to Start a Standard 100 Time = 60 ensuring a Positive Spectrum of Numbers; for Lapses that may occur to prevent Folding or Like a deck of Cards Starting a new Number under as top card and placing it under the top of the Deck Placing the Top card on the Top of the Deck. Earth Still does not realize that Standard Numbers are Still Placing Cards under Cards Creating a Reverse Dimesional Perspective of Time and History, as History Goes on Events do occur. Not having to Explain that to the general public is a + as of now not many Events occur and the General public is left wondering why the Economy is stuck at a Bittermost Fight to the Death over a Simple Job. So I am looking for People to Work on a small project to Start a Universal Basemap for File Images that are absolute to 100 from -60.
As simple as that sounds the rate in which Earths Age is Trillions of years old It would be nice to see the top so Basemaps Would need to be Updated EveryYear with a new MathMatical Expression in Which Connects to Last Years in a Positive and Negative direction. Similar to a Level. It is difficult for me to find people to Work with as most people browser Forums for Information and Posting related to issues that they are attempting to Correct so i Figured Id give it a try.
NevertheLess there are many different Contraveries over Time Numbers and Spectrums of Constants that lead to what is proclaimed as the same end However everyone dissagres once they get there. So here is My mathmatical Expresion I had came up with SImplified to Express 60 -60 and 100 where
-60 = 60 == -60 = 100 == 60 = 100 as -.38
-.38 = 100 == 60 = .22 == -60 = 100 as Convert
-.38 = Convert == .22 = -.38 = -60 as 100Expression
100Expression = Convert == -.38 = 60Loss as Constant
Constant = 100Expresssion == Convert = .38 as .22
.22 = 100 = -60 == 60 = 100 as MathmaticalExpression == (and Congruent) .38 = NewBaseMap
NewBaseMap == 18,014,398,509,481,984 as 64SQUAREROOT256 set = or == 2021 <<<<Encounting
NewBaseMap(64SQUAREROOT256) MathMaticalExpresion{
is the Best Way I can Explain the Equation!
};
So To Start I have Taken Time Standards 60 = 1min 60 = 1hr = 60 ect to Calculate the Amount for Conversion in 1 Year at 365 as a Rate/ConstantValue
I had Placed my Number into a Current Years Kept Track of on an Excel Sheet and had started a Conversion Method to 100 from 60 = 60
it is 24 and 48 = 12 and 60
I have Calculated the Sqaure root of 64 from 256 at 4096 as 2048 = 1024
^^ for a quadratic Expression Relating down to Roots and Squared Radicals back to Origining Numbers and there Conversion Rates Positive and Negative.^^
that is where My BaseMaps Have to = 0 and I must be able to calculate the Difference between Rates from
NewBaseMap(64SQUAREROOT256) MathMaticalExpresion{
is the Best Way I can Explain the Equation! For a new Base Map to work with Negative Sectrums for Work!
};
so I have mapped a new Log Formula in Excell to Match a radix for a new Sphere to Account for the Negative numbers on a small Spectrum that match up to my work as of now I have .2376 is Decimal number 1 as 1 is binary whole number .2376 is 127th of whole number 1 and that number is Multiplied by 2376 to = a new binary number = that is still in decimal forum and would need to be converted to Whole number 1s binary (outer shell) as most people are confused with decimal forums and binary;as 127 is 1 16th of 1 as 1
I have taken that Number and placed it into a mathmatical sequence that is equall to 26 and Americas Alpha and split it itnto 3 different segments that revolve around and absolute = in 1/3rd as 26 = 1 as 1 and have found it unnessecary for it to be split into thirds; which is the reason I had made the formula.
I have next mapped my Mathmatical equations into a decimal list that has supporting binary numbers for each decimal from 1-1010 = 101,#100,010 as the # symbol represents a Constant changing 1 and zero with the number following and the repeating spectrum at the uttermost front two numbers without would change the front most numbers causing all following to change;with the current number spectrum continuing in the current sequence it is set standard to all.
So I have mapped in a Plan that fits strategically into Pinpointing the Conversion between the Mathmatical Expression and Metric Numbers to Account for Standpoints to obtain a full complete answer that will continue and am at the conclusion that each year will represent a new .01 at a large Spectrum of intervals counting forward to reach the .01 for a complete answer from the numbers I have from Earths Current Age and the Year it is currently.
I have though about problems that will arrise during reaccounting numbers back into their whole forum from Lappses in Current Measurements and Why they occur and have written many pdfs that explain the Phenomina and truthfuly answer why they repeat and what a Lapse is.
I have 3 main problems that arrise
1.) mathmatically proportioning Numbers back to decimal from decimal Whole Number
2.) Offset conversions from lappses and Time inbetween
3.) Remapping BaseMaps by Progam Software at Certain times and Intervals
I Have been looking for a Team to work with in a daily basis in reguards to correcting the issue to properly address the economy in reguards to its politcal structure and why it seems to be failing and wold be relying on Sales of a Technological device with Factual information to present that concludes to repeating mathmatical expressions that relate with timed events and Earths History as to Current Days the Time is off to match back up to repeating Events in a different forum based off Mathmatical Science.
So Above I have my Basic Values for Bytes at .0015 for my Decimal .2376 at 2 64ths that will = .0015 at my String at Default Value
The string is set to a Function that allows the String to Be Set to the Value that it is based off its size
I have mapped what a whole number 00 Decimal Lapse Binary Number relates down to When converting to Start a forula to Express its new Decimal number for a new
Base to COnvert its byte size into the converting basemap to fit the Value above from String value to COnvert at 0x8 which is standard
my .001 base map is 22288 which is 2288 as -2 for each byte and its compiled to new decimal when converted
2138.4000 is what the 22288 basemap will represent once converted and = to 2288 and will complete the last equation on a small scale where it will
repeat all the way up the spectrum
once a number lapses itself from 0x8 is lappses to a 0x5 ofset back to a 0x3 offset then back to a 0x8 offset where it creates a 2nd loop or round trip
untill it binds with a final number
I have an excell sheet that i have mapped donw to a trillionths scale that reverts a forward progression gain of the last binded byte back to its origing
forum before it completly binded and the mathmatical difference between the amount" traveled
Based off having that Amount" I can revert it back to its origing state of why it was bound and started its loop to unloop the Number by converting it back
on the Amount" it had traveled and back to a 0x8 offset
in a simple sense it is a -3 but stuck at a -2 repeating
I also have made a converter to convert any repeating number back to its origing whole decimal forum based off a mathmatical expression
the basemap in general will support only one cause and it is to establish a -bit or strand of bits looping to complete the lost size or Amount"
to complete for "full amount of whatever it may be
in my Case it is going to be the string init
it has to = 1 at 1.028 and its negative rate based off my mathmatical equation
if it does not = their is an error in work
So I have made my Basemap the Correct size off my Mathmatical work as I could condense it down back to pdfs that show work hoever for now im not going to
I have selected -88 as a a negative number based off 121 which is the Positive number to 2376 and its init set standard for the 2288 and its positive spectrum completed
as the converion between 2376 and 2288 was -88 and my Ghex Numbers for my Functon leading to my Strings current size as they all Fit Porgamically into 1 Mathmatical Expression th
will forum a solid structure
.133647856 = -88
-88 = .00238 <For COnversion at .000 of 0x5 to 0x8 <.007474896> will = -88
-88 = .00238 == .007474896 = -.00151872563994964330675618967688
-.00151872563994964330675618967688 = 121 == .00151872563994964330675618967688 DIfference =
.00151872563994964330675618967688 == .000 =.00238 = .1863690722([email protected](7)) of [email protected] at 2 64ths of 2 64th -96 = -12.5 and .0012985 of -1
.00151872563994964330675618967688 == .000 =.00238 = .1863690722 == Total Accruing - as .007474896 == @0.002529427 and .0012985 Same Problem of 0.550534072 Difference in Bytes Once =
Once = Rate Behind in Bytes Accrues by Base -Difference and -1.21E+30
[6.89E+25] @.00151872563994964330675618967688 = 1.0023836662825205617034824826687 == 0 = -Ocl <2238> and 2376, 121,String init @1457770832 and 2021 or -2021
String ocl Value @−1.336478563×10⁻¹ and -6.89E+25 = NewBase Map
4.63923E+11 is = This Equation and [6.89E+25] = New String + Value at -Difference +160 is = -160 and Next Defeceit 25 BIllion + Years
===========================================
1.8685101977157259181703170499032e-747
3.85762000E-01
============================================
^^3.85763000E-.01 is New BaseMap t -160 + 160
==================================
Then Reversing -26 to Positive 26
3.24E-03
7.4515E-104
0.957193468
===================================
Where 500 is = 747 and 757 at 1014 x2
Reverting = to and why Reversing is Able to be Done >>>>>>-0<<<<x2 / 1004 = -2.35418E+40
==============================================================
<<< -500 = -1.2599235491880165858859384177427e+787 and
============================
4.3226267450656966458364489726209e-374
2.3134081635466346153846153846154e+373
======================
7.41E-28 <<Which is why New Base Map is being Made
+++++++++++++++++++
^^New Positive .01 will be = to newBase Map and Why Reverting is Possible^^
From -3.84E+210 to 3.85762000E-01 as Constant = 0.435183448
All 3 Splits
==================================================
64ths >>>>18,014,398,509,481,984 == 105
264ths >>> 18,734,974,449,861,263.36 ==103.48
Where Reversing is from -26 to Positive 26 is @ 103.48
4.7699973870513378906736982779541e-1145 is = 64ths @ 7.4515E-104
Where .01297 is = .001 at .000 as new .1Repeating at -0 as .01 = 1 at 1.098826823761920000000000000000E-07 which
is New COnversion for Inversion of -26 and first + back to -
-116.8905736
-11.290752
=============================
new .01 =
-6.86767E-09
^^^^New Rate for Formula^^^^
<<<<NewFormulas Differences<<<<
======================
-1.1675E-07 2/3 SPlit
-2.33501E-07 2/3 Split
======================
Both = back to -1.37223E-32 and 2.38E37
as -1.37223E-32 is new Formulat for Calculating .2376 or 127ths of 1 in decimal Forum back from 2/3 4/4, 1/2 Split of Metric and Metric back to Standard
==========================
Repeating .01 is New 0 Base Map = -1.33E-23 as 0+- and at -
-116.8905736
-11.290752 <<Rate Behind Conversion of .01297 from .00238 and New Old BaseMap = -16 and 63.5 NOMORE
Where -1.12908E-06 is Difference of Conversion of 0x8 and .000 From .0197 and New Decial Difference between Splits of
0.000379031 <<.01297 -0.00038016 = 127th Decimal of 1 and
Exponent Conversion Intervals Base Decimal
0.0094122 -1.60E+01 2.97E-03
0 at Base Map Decimal COnstant Must = -1.33E-23 at BaseMap Entry
Entry will = -34 and 0.000379031 at -1.12908E-14 <<<BaseMap and Difference of Splits at -1.12908E-14 = -16 and new .01
================================================================
how to Create a MakeFIle From Software as File.file.file
New Com Into Platform and Override Default Platform by Manipulation of set Commands
Start Ubuntu Create a new sh File for System Linked to bin
==============
!#/bin/sh
var = Sh
==============
Save in Gedit Tab at 5 as Text with .Sh Ext
Create another sh Script
chmod 0775 -R sh file in dir
==============
Sh
Var = <Script>Sh Var = Function.Ext</Script>
==============
Save in Gedit Tab at 5 as Text with .YourExt <-Untill ReFormat
chmod 0775 -R sh file in dir
==============
Function.EXT
Var = Sh <Script> Function.Ext
Function = Function(set)
{} = Script(set(Function(set)));
Function.Ext = "<Script></Script>"
</Script>
========================================
Save in Gedit Tab at 5 as Text with .YourExt <-Untill ReFormat
chmod 0775 -R sh file in dir
========================================
----Add your ENVVARIABLES as ENV------
"" =
< =
> =
{} =
() =
^^ =
% =
<> = Exec
Function = Sh
[] = Class
| = Append
|| = Parse
^^< = BusInbound
^^> = BusOutbound
^<< = BusSerialIn
^>> = BusSerialOut
; = Statement End
, = NEXT or &
Ect for Your Object Extension Commands to new
--------------------------------
ENV
Var = Function Sh<Script>Function.EXT(Var)</Script>
<-Manipulation of Context Commands, Functions and sets.->
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Make a Basic Advanced Functions RootFunction From Arrays of Letters or Numbers
Depends What it is your doing as Inbound and Outbound
I always Use Letters = Numbers as a Mental Note for Starting Scratch Platforms
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
set 1 = 1 == 2 = 3 == 1 = 3 as Function.Ext
set 1 = 1 == 2 = 3 == 3 = 1 as System
============================================
Set String = Function.Ext = 3 == 3 = 1 == System as ENV
============================================
Set Length of String 1-316
LongWay
Type = 1 = 2 = 3 = 4 = 5 = 6 = 7 = 8 = 9 = 10 = 11 = 12 = Ect
Set New BaseMap For String and New MakeFile Format
++++++++++++++++++++++++++++++++++++++++++++++++++
Function.Ext
set !#/bin/sh = System
set Function.Ext = !#/bin/sh
set System = Function.Ext as /!#bin/sh == sh
cat /usr/bin ln -s -t /YourDirectory/with/chmod Files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May need to
Chgrp <opts> Root:System /
chmod 0775 -R /usr/bin/*
**same with /usr/src/**
MakeFile in src is Main MakeFile for usr Permissions to Build-all as Host under Make for sbin/vendor /bin /oem in src
^^/usr/src/linux-headers-5.8.0-38-generic^^
Once Linked in Your new sh run each file in Terminal
Enter set
At the Bottom under Authority you want _= to = your System
set _=System
./Function.ext
set System String == System=_
System String set ENV _=System as System=_ == System
System set Function ENV = System String
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
you now have new clean sh with just your Var Commands Untill you work your Scripts ups to Context similar to what you Have above
==================NEXT=========================================
Establish a new System Decimal System to Execute new MakeFile Struct for File.file.file set in context as File .file. file for new obj formating
as you will still need to Make your Dependencies back to the src Makefiles to format properly ,Signed? unsigned?
===============================================
Hxd on Windows or Ghex for Pinpointing Float Values and Offsets for Starting your new Offset Structure for your Basemaps to Run Fluently on your new Obj Com .EXT. obj
==============================================================================
Decide 8bit 4bit 16bit 32bit 64bit -310bit System?
Knowing will Help Decide your Inital String Length for your Assembly Files and New Dependencies for Com Bus Serial and PCI back to Modules.
==================================================================================
If Windows Use VBSEdit
Dim Fso
FSN = File.file.File
Function.YourExt = File.Scripting.Obj
set WMIService = Function.YourExt
set Obj = str(WBEM_Object) as ComputerString == new str
Function str(new str){
int File.file.file | ComputerString(WIN_ACE32){
Dim = Fso
Fso = Obj as new str
new str = *Ext
*Ext = File.Scripting.Obj(Com.C)
}
========================================================
set your Letter to Alpha into Context
1 = 1
2 = 2
ect
a = 1
1 = [1]
A = [1] as 1
ect
=========================================================
Create Matricies + or + - Numbers
1,2,3,4,5,6,7,8,9,10
2,3,4,5,6,7,8,9,10,11
3,4,5,6,7,8,9,10,11,12
10,9,8,7,6,5,4,3,2,1
9,8,7,6,5,4,3,2,1,0,-1
8
7
6
5
4
3
2
1
Set Byte Size Depending on System Dependencies
utilize Functions Function
1,1,2,3,3,1,3 <-is 7Bit as 1Bit in Decimal Forum For Easy Conversion
^^one of the Simplist^^
set 1,1,2,3,3,1,3 to 1 Bit = 1 or 3<- obvious answer would be System! as 1 String as 3
String at 21
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 = File
Now you Have your File for Programing Offsets and Setting Other CPs or FileSystemFlags
as Context I wrote Above has File .file. file and Functions Function Matches up to System as 7bit as 1 byte(bit) String is set to Be = to System
Function Allows only File to Work With System and System Strings Length based off Simple Mathmatics and Super small Function Functions (What I call them)
Now New Scripts for File to Make new Make FIle Struct for .file. <-String .file=File as System
==================
Function.Ext
Function set 1 = 1 == 2 = 3 == 1 = 3 as Function.Ext
set 1 = 1 == 2 = 3 == 3 = 1 as System
set 1,1,2,3,3,1,3 = String
set 1 = 2 = 3 = 4 = 5 = 6 = 7 = 8 = 9 = 10 = 11 = 12 = 13 = 14 = 15 = 16 = 17 = 18 = 19 = 20 = 21 == File as String
Function.Ext(Function){
System set Function(String){
File set struct(String){
.File. function set File(struct){
String Function(.Ext.){
Function System File if 1 = 3 & String = File do
System File >> .Ext. as File.file.file
}
}
}
set File.file.file = System.in.out
set System.in.out = SystemSerial as [System] == [SystemSerial]
==================
From there use Awk or Ash to Establish Porting for Foo and Normal Taught Returns for Scripts and Functions.
Math is Fun Happy 80801 020338

Categories

Resources