hey guys, Can any body tell me how shall i start with the project. I will be using Java and C together(JNI) in netbeans for coding. I will be embedding the C code in Java(Interface). First i want to read the wav file in C and sample it and apply FFT algorithm.. And output should be an spectrogram. can any body tell me how to start.

Member Avatar
Member Avatar
+0 forum 11

Greetings, Can anyone tell me why my loop does not actually add anything for interest? I'm thinking it is because of the way my interestRate variable is setup as a class variable (static). Here is the code snippets /**************************************************************************************** HNUnit4Ch13Investor.java xx All variables should be declared private Declare a class variable called interestRate (This will hold the annual interest rate) Declare a constant called ACCOUNT_NUMBER Declare an instance variable called balance Provide a class method that will be used to set the annual interest rate Provide a two parameter constructor to initialize the constant account number and balance Provide an …

Member Avatar
Member Avatar
+0 forum 2

Greetings, I have been trying to figure this out for hours with no avail. Basically I need to print out user input as Initial value, ASCII(char), ASCII(int), and Hex. I can get everything to work however I am not supposed to have the char values print if its a digit, and int values print if its a char. I can get everything to work except I cannot figure out how to exclude both the letters and digit in the same for loop. The way it has to be printed is quite strict. My code below will print the Initial, ASCII(char) …

Member Avatar
Member Avatar
+0 forum 2

Hello! I am looking for some assistance with adding code to my program for handling non numeric data/user input, specifically letters. The program is coded in java. import java.util.*; public class AnArray { public static void main (String [] args) { // creates an array of interegers between 0 and 50 int element[] = new int [51]; // scanner for input Scanner scan = new Scanner(System.in); int input; // do/while loop for inputs do { System.out.println("Enter a number between 0 and 50. Enter -1 to quit."); input = scan.nextInt(); // replace this line with new methodPhil sends if(input == -1) …

Member Avatar
Member Avatar
+0 forum 3

Greetings, I'm having problems with my output. Essentially I am just trying to print out any Cat who is over 3 years old and has Claws. But my output keeps printing out either nothing at all or the 3rd cat 3 times. I've struggled with this for hours trying to figure out why.. any ideas? This is my driver java file. It will compile and run just fine but it doesn't work like it is supposed to.. import java.util.Scanner; public class NathanialProg6 { public static void main(String[] args) { Scanner input = new Scanner(System.in); Cat cat1 = new Cat(); Cat …

Member Avatar
Member Avatar
+0 forum 3

I have been trying to fix this since two eeks and I have no clue what I am doing wrong. I have gotten the program to work so that it can tell if a number is prime or not, but the problem I am having is showing at the end how many prime numbers there are for the two numbers, calculating the average and lastly asking the user again to input numbers. Can anyone help please! Here is the my code [CODE] #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { int x; int y; int i; int c; int primecount; …

Member Avatar
Member Avatar
+0 forum 6

**This is intented for learning purposes, feel free to study the code** Create a drawing that looks like this (pyramid) The number should be incremented with the modulus.

Member Avatar
Member Avatar
-1 forum 7

I am having a problem completing my program. I am sure it is a simple mistake. My results look something like this How many students do you have? 2 How many Exam grades do you have? 4 Enter a score for student number: 1 98 Enter a score for student number: 1 78 Enter a score for student number: 1 88 Enter a score for student number: 1 83 Enter a score for student number: 1 77 Enter a score for student number: 1 77 Enter a score for student number: 1 77 Enter a score for student number: 1 …

Member Avatar
Member Avatar
+0 forum 4

#include <stdio.h> #include <math.h> #include <conio.h> #include <process.h> #include <string.h> void main() { int i, n, diff; int x = rand() % 100; int bMoveHigher = 0; int bGuessedCorrectly = 0; printf("Welcome to Guess a Word Program\n"); for (i = 1; i <= 5; i++) { printf("ATTEMPT %d: Enter the your number: ", i); scanf("%d", &n); if (n == x) { printf("Congrats! You have guessed the number correctly\n"); bGuessedCorrectly = 1; break; } diff = (int)(fabs(x - n)); if(x > n) bMoveHigher = 1; if(diff >= 50) { if (bMoveHigher == 0) printf("Your guess is VERY HIGH\n"); else printf("Your guess …

Member Avatar
Member Avatar
+0 forum 5

Hi, i have this project where the size, 2d array of size n is scanned from a file; asks for the vertex pairs from the command prompt until the user decides to stop inputting them. There is something wrong with my code because it skips the scanning of int variables from and to. Please help me and tell if you spot the problem. Thanks :) int repeat() { char rep; printf("\n\n Proceed to Next Matrix? Y / N: "); rep = getchar(); scanf("%c", &rep); if(rep == 'Y') return 1; else if(rep == 'N') return 0; } int operate() { char …

Member Avatar
Member Avatar
+0 forum 4

in my i.t lesson we were intoduced to 'raspberry pi' within 'Python' and for my homework i have to explain what we did in the lesson. It says i have to include what 'input' is when coding a programme. Please help and reply as soon as possible and keep in mind i dont really understand computer or technology language/words! Plus, i remember watching my teacher show us on the board something along the lines of "end/run command/programme when enter is clicked" can anyone help me with that? Thanks!!

Member Avatar
Member Avatar
+0 forum 1

Can anyone help me with this homework assignment. Im so confused!!! Create a very simple four function integer calculator with buttons for Add, Subtract, Multiply, and Divide, and with two text-type input fields. When the user enters two numbers and clicks one of the buttons, the answer is displayed where shown. Your program must use an alert to tell the user about any errors. The possible errors include: One or both input fields are blank One or both input fields < -9999 or greater than 9999 Divide by zero Illegal character in either input field. Only 0, 1 ,2 ,3 …

Member Avatar
Member Avatar
+0 forum 1

![3a451fbd93eb17f84f06c7ac648bdcab](/attachments/small/2/3a451fbd93eb17f84f06c7ac648bdcab.PNG "align-left") I need to create this program for class. I'm not looking for the answer. I'm simply confused on how to create a batch file where I input a number and it gives me an option. Would I use the IF command if so how would I do it. My teacher is awful and he doesn't explain anything. Here is what I got so far @ECHO OFF ECHO This BAT file will display the symbol of your choice Echo. ECHO 1. Stars ECHO 2. Dollars ECHO 3. Pluses ECHO e. Exit Program ECHO. ECHO Enter your choice (1, 2, …

Member Avatar
Member Avatar
+0 forum 9

****Hi everyone! I have to make a pig latin translator for cs hwk. I've made my code and everything works up until i put it together. I need to debug it, but can't figure out the if statement in the main. The assignment is "Here's how to translate the English word englishWord into the Pig Latin word pigLatinWord: If there are no vowels in englishWord, then pigLatinWord is just englishWord + "ay". (There are ten vowels: 'a', 'e', 'i', 'o', and 'u', and their uppercase counterparts.) Else, if englishWord begins with a vowel, then pigLatinWord is just englishWord + "yay". …

Member Avatar
Member Avatar
+0 forum 4

Hello, I've got a question about a project in my operating systems class. The task was to create a program that lets the user choose a variety of cpu scheduling algorithms and simulates them with random data or data from a file. I've already done it for first come first serve, shortest job first, and priority. I've got the round robin code to work I think I just have no idea how to calculate the average wait time (AWT) or average turn around time(ATT). Here is my code for FCFS algorithm: void FCFS(job jobList[iterationsToRunTest][numJobs], results &output) { queue <job> q; …

Member Avatar
+0 forum 0

The following is my homework assigment. I have it more or less complete. I would like feedback from the community on what I can improve in the program. Basically, before I hand it in to my professor, I want a fresh pair eyes to take a look at it. There's also three lines that I want to edit in the program but I'm not sure how to do it. I wrote comments in capital letters next to those lines. I'm almost sure that my professor will overlook those lines. I want your feedback for my benifit. As I mentioned before, …

Member Avatar
Member Avatar
+0 forum 5

I need help with my homework assignment. The assignment is write a method DisplayDigits that receives an integer between 1 and 99999 and displays it as a sequence of digits, separating each pair of digits by two spaces. For example, 4562 should appear as 4 5 6 2 I have tried several ways but all of them failed. I'm new to C#. *Attempt 1.* static void Main() { int numbers; Console.Write("Enter a number between 1 and 99999: "); numbers = Convert.ToInt32(Console.ReadLine()); DisplayDigits(numbers); } public static void DisplayDigits(int numbers) { int digit1, digit2, digit3, digit4; while ((numbers / 1) % 10 …

Member Avatar
Member Avatar
+1 forum 3

I need help with my homework. Out professor doesn't explain anything and i'm struggeling. TMy homework is: Write, test and debug a program which asks the user to enter three floating point numbers and then reports the largest and the smallest of these values. Here is the example program dialog: Enter the first number: 43.5 Enter the second number: 110.2 Enter the third number 35 The smallest of the values is: 35 The largest of the values is: 110.2 When your program is working correctly, run it four times, using these value sets for the input: 20.5, 14.3, and 90.9 …

Member Avatar
Member Avatar
+0 forum 4

Hi folks! I need some homework help. I have the following requirements: // Strings required for Homework. String[]strVector = {"octhkeugrk", "fedjigchba", "mnpqdetjhz", "bgxlvfcdaz"}; a) Write code that transforms the string array provided above into a 2 dimensional character matrix, (e.g., char[][] charMatrix;). b) Once in the two dimensional array form, use insertion sort to sort the characters of each row, from a-z. c) Create your own CharacterLinkedList class, where each node in the list will hold a single character. d) Create an array of 4 elements of type CharacterLinkedList. e) Use the sorted 2D array from step (b), and for …

Member Avatar
Member Avatar
+0 forum 7

**Question** You are to design and implement a GUI application that will calculate the price of a pizza, based upon the size, style of crust, and selection of toppings. The price is calculated according to the following rules: • A plain small pizza is $6, medium is $8, large is $10, and a partysize is $12. • Thick crust is $1.00 more than thin crust, regardless of size. • Additional toppings are $0.75, $1.25, $1.75, and $2.25 each for small, medium, large, and partysize pizzas, respectively. I recommend using radio buttons for the choice of size and crust, and check …

Member Avatar
Member Avatar
+0 forum 2

// CS 1063 Project 1: Print Text Patterns The Patterns Class Objectives This is one of three major programming projects this semester. You may NOT collaborate on this project. While you may ask for assistance in debugging, this project should be ENTIRELY your own work. [EDITED BY ADMIN ON COPYRIGHT GROUNDS...]

Member Avatar
Member Avatar
-2 forum 5

Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. If a == 0, no solution, and if (b2-4ac) < 0 it has only complex roots. Function 1: - Read one set of values from the file, using reference parameters to get the values out of the function - Return whether or not the function was able to correctly read three values. The data error is too few values on the line, e.g., the line …

Member Avatar
+0 forum 0

Hi everyone , i hope someone helps me out. im working my way up step by step learning Java . but no one at the University is helping , they just give us the homework and we have to learn alone.and give the soltution at the end of the week. the problem is i cant make mistakes cuz if do i will not be allowed to enter the final exam at all. so its like challenging the students not teaching them... i would be very thankful to the one who helps me out , and be sure that i will …

Member Avatar
Member Avatar
+0 forum 9

I am getting an error saying function does not take 2 arugment. Dont know how to fix this. Please help. #include <iostream> #include <cmath> using namespace std; void set_sides(int,int,int&); int main() { int Area, Volume; cout << "Surface Area and Volume of a Cubic Prism. " << endl << "Please enter a length of the Prism " << endl; cin >> Area; set_sides(Area, Volume); cout << "\n The volume of a cube is: " << Volume << endl; return 0;} void set_sides(int d,int& vol) {vol =d*d*d;}

Member Avatar
Member Avatar
+0 forum 3

Write a program with subclass InterestAccount and CDAccount. The driver program (Account.java) must perform following transactions: 1) Print the name of your bank and yours at the top. 2) Creat an Intrest Account for "Benjamin Franklin" with PIN of 1234 and a starting balance of $100. 3) Creat a CD Account for "William Shakespeare" with PIN of 4321 and a statring balance of &1000. 4) Do three monthly updates, printing out the amount in each account. 5) Deposit $1000 in the Amazon's accounts. 6) Withdraw $500 from Ebay's accounts. 7) Do at least 10 times or more monthly updates, printing …

Member Avatar
Member Avatar
+0 forum 2

i have a final project which i really need help with.

Member Avatar
Member Avatar
-3 forum 1

I have a class which includes a constructor that holds hours and speed, getters and setters, and a method which calculates distace using the hours and speed variable. I need this to display a table which takes however many hours the user inputs, then for each hour display a row that shows how far per hour. here is an example: hour distance traveled -------------------------------- 1 10 2 20 3 30 etc. Right now my program is mostly okay, except when I run it I get someting like this: hour distance traveled -------------------------------- 1 30 2 30 3 30 etc. So …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am writing a sudoku solver program that uses recursion to solve all the empty cells. However, I have no idea why my function did not do anything. I read in my puzzle as double char array and convert it to double int array. My output is : 900020750 600050040 020400010 208000000 070509060 000000401 010005080 090070004 082040006 where all the 0s are the empty cells // #include "puzzle.h" #include <iostream> #include <stdlib.h> using namespace std; Puzzle::Puzzle(const char grid[][9]) { /* for(int i = 0; i < 9; i++) { for(int j = 0; j < 9; j++) { //cout …

Member Avatar
+0 forum 0

you will write a program to solve linear equations given in upper triangular form. There are N equations, and N unknowns. This is equavalent to the following matrix multiplication [A][X]=[B], where A is a square matrix (N by N), X and B are vectors with size N. Back Substitution: First, find the last unknown (Xn ) in the last equation. Then substitute its value in the equation just above it and find Xn-1 . Repeat back substitution until all X’s are found. Your program should dynamically allocate memory for the data structures. please help me with my homework because i …

Member Avatar
Member Avatar
-2 forum 5

Hello everyone: I am new here. I am taking an entry-level programming class at an online school. We are in our 5th week of pseudocode and learning to use loops and sentininels. I have just completed and individual assignment and was wondering if anyone would be nice enough to look at it and see if I left anything out. The assignment is to write a code that allows the user to enter a series of temperatures in degrees Celsius (C) terminated by the input of –999, using the conversion formula of F = 9 * C/ 5 + 32. For …

Member Avatar
Member Avatar
+0 forum 3

The End.