Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Tohrchur

Member
  • Content Count

    224
  • Joined

  • Last visited

Awards


This user doesn't have any awards

5 Followers

About Tohrchur

  • Title
    Member
  • Birthday 1997-04-29

Profile Information

  • Gender
    Male
  • Location
    Maryland
  • Occupation
    College lol

System

  • CPU
    i5 3570K
  • Motherboard
    low end MSI
  • RAM
    8GB Kingston
  • GPU
    7970 OC'd like crazy
  • Case
    Corsair Air540
  • Storage
    250GB SSD & 2TB HDD
  • PSU
    750 OCZ
  • Cooling
    Watercooled :D

Recent Profile Visitors

599 profile views
  1. Tohrchur

    240/280 rad for CPU + GPU?

    Totally fine. I have a 240mm rad for my CPU and GPU, my gpu is a 7970 OC'd to the max it can go. CPU is at 4.0ghz, and my temps dont go above 50 under benchmarks. If you can fit a thicker rad then go for it. Also, I've a good experience with alphacool.
  2. Tohrchur

    Java - Input from file

    I always get an exception error message with the Scanner sc = new Scanner(file); do i absolutely have to do a catch and try to work with files? thats what Ive seen from stackoverflow but just seems weird to me that the only way to read from a file is with catch and try.
  3. Tohrchur

    Java - Input from file

    So I'm trying to get ahead in my labs for my programming class. I've got this one lab almost done but she added a part where I have to take integers from a txt file "input.txt" and have them in an array in the program, then methods with take over. I've done a whole bunch of Googling but couldn't quite figure out how to get input from a file. Also it needs input validation to make sure that the only thing being passed to the array are integers. Any help is greatly appreciated.
  4. Tohrchur

    Importing my own class file?

    Figured it out last week, thought I'd post incase someone else comes across that. I had to create the function. I had to do: lab2 function=new lab2(); then all of my methods were function.MethodHere;
  5. Tohrchur

    Importing my own class file?

    I had the import lab2 to try it because nothing was working. I am using jGrasp but i will try others. Thank you!
  6. Tohrchur

    Importing my own class file?

    Also that is not all of the class file, its like 200 lines long, i just screenshotted the first part.
  7. Tohrchur

    Importing my own class file?

    this is the class file this is the test file
  8. Tohrchur

    Importing my own class file?

    This is whats on top of my test file. package myPackage; import java.util.*; import java.lang.*; import lab2; and this above my class file: package myPackage; import java.util.*; import java.util.Arrays; import java.lang.Math.*; public class lab2{
  9. Tohrchur

    Importing my own class file?

    I put them both in package "myPackage" and then on the test file i put "import lab2;" and tried "import myPackage.lab2;" both with the same error.
  10. Tohrchur

    Importing my own class file?

    Tried that. I get this error.
  11. Tohrchur

    Importing my own class file?

    I've never messed with packages before. Do I just have to put at the top like "package myPackage;"?
  12. Tohrchur

    Importing my own class file?

    Hey guys I'm having a bit of trouble. I made a whole giant class file called "lab2" that has a bunch of methods in it. And part of the assignment is to also create a driver program to test all the methods. I can't figure out how to get my lab2 class file imported into my lab2Test main class to test it. If it matter, both of the .java files are in the same folder. Any help is appreciated!
  13. Tohrchur

    Java probelm help - type validation

    I rewrote the program and it works for the most part. But if i enter an "invalid number" (not between 5-21) it wont exit that loop and will always give the "invalid number" response and never continue to the rest of the program (which has yet to be written)
  14. Tohrchur

    Java probelm help - type validation

    the problem is that i could enter a 3 right? and it would pass the integer test. then it would go to the range test and would fail. so it'd ask again but between 5-21. but at that point i could enter "adkfrjadsf" and it would go through since it passed the integer test already. Here is what i have so far. Ive written like 5 different programs trying to figure it out so i tried to get this real quick cuz the rest were ugly.
  15. Hey guys so I have this lab due and really need some help. The first part of the lab I had to validate the type of variable input. But the second part is also validating the range of numbers and I cant seem to figure out how to do both within in a loop so that until satisfied itll keep looping. I've tried using the hasNextInt() to get it to make sure that input is an integer. but I cant get it to make sure the range is between 5-21 and loop if it is not because the input could be 4, so its an int and goes past the hasNextInt() check, but then its not valid range and if it asks again I could enter a string and it'd be all messed up. Please help. Heres the prompt.
×