Search:

Type: Posts; User: CrashOverride417

Page 1 of 2 1 2

Search: Search took 0.12 seconds.

  1. Replies
    63
    Views
    4,455

    Re: Time Class problem

    470
  2. Replies
    63
    Views
    4,455

    Re: Time Class problem

    public int minFromMidnight()
    {
    return _hour+_minute*60;
    }

    ??? like this
  3. Replies
    63
    Views
    4,455

    Re: Time Class problem

    60*7+30
  4. Replies
    63
    Views
    4,455

    Re: Time Class problem

    i got no idea how to do that
  5. Replies
    63
    Views
    4,455

    Re: Time Class problem

    i managed to figure it out now to my next question how the method minFromMidnight will look like
    this method returns how much minutes passed after midnightfor example if the time stored inside the...
  6. Replies
    63
    Views
    4,455

    Re: Time Class problem

    public String toString() {
    final StringBuilder sb = new StringBuilder ("Time1{");
    sb.append ("_hour=").append (_hour);
    sb.append (", _minute=").append (_minute);
    ...
  7. Replies
    63
    Views
    4,455

    Re: Time Class problem

    it was with string.formatter and i am not allowed to use it
  8. Replies
    63
    Views
    4,455

    Re: Time Class problem

    1. Testing Constructors and toString:
    t1=com.company.Time1@1b6d3586
    t2=com.company.Time1@4554617c

    2. Testing accessors and mutators:
    t1=com.company.Time1@1b6d3586
    Hour of t1=20
    Minute...
  9. Replies
    63
    Views
    4,455

    Re: Time Class problem

    ********** Test Time1 - Started **********


    1. Testing Constructors and toString:
    t1=17:45
    t2=17:45
    t33=00:00

    2. Testing accessors and mutators:
    t1=20:10
  10. Replies
    63
    Views
    4,455

    Re: Time Class problem

    i am posting over and over and over and one more time over


    package com.company;
    import com.company.Time1;
    public class Time1StudentTester
    {
    public static void main(String [] args) {

    ...
  11. Replies
    63
    Views
    4,455

    Re: Time Class problem

    are you sure you know java ???? cause for now your not helping at all
  12. Replies
    63
    Views
    4,455

    Re: Time Class problem

    i am asking if it can be replaced and if it can than with what ???
  13. Replies
    63
    Views
    4,455

    Re: Time Class problem

    return String.format ("%02d:%02d",_hour,_minute);
    this line can be replaced and still get same result ??? i just figured it out that i cant use string.format
  14. Replies
    63
    Views
    4,455

    Re: Time Class problem

    so again same question how do i continue from this spot ?????
  15. Replies
    63
    Views
    4,455

    Re: Time Class problem

    Error:(11, 20) java: constructor Time1 in class com.company.Time1 cannot be applied to given types;
    required: int,int
    found: com.company.Time1
    reason: actual and formal argument lists differ...
  16. Replies
    63
    Views
    4,455

    Re: Time Class problem

    thats why i need help understand how to continue from here
  17. Replies
    63
    Views
    4,455

    Re: Time Class problem

    package com.company;

    public class Time1 {
    private int _hour;
    private int _minute;

    public Time1(int h, int m)
    {
    this._hour = (((h >= 0) && (h < 23)) ? h : 0);
    ...
  18. Replies
    63
    Views
    4,455

    Re: Time Class problem

    package com.company;
    public class Time1StudentTester
    {
    public static void main(String [] args) {

    System.out.println("\n********** Test Time1 - Started **********\n");
    ...
  19. Replies
    63
    Views
    4,455

    Re: Time Class problem

    it works but i dont recive the second output as 17:45 but as 00:00
  20. Replies
    63
    Views
    4,455

    Re: Time Class problem

    i am required to build a class named Time1 and than run the test class on the Time 1 class to see its compiling without errors


    public class Time1StudentTester
    {
    public static void...
  21. Replies
    63
    Views
    4,455

    Re: Time Class problem

    1. Testing Constructors and toString:
    t1=17:45
    t2=17:45

    this is first input i am missing the t2 = 17:45


    System.out.println("\n********** Test Time1 - Started **********\n");
    ...
  22. Replies
    63
    Views
    4,455

    Re: Time Class problem

    public Time1(int h, int m)
    {
    this._hour = (((h >= 0) && (h < 23)) ? h : 0);
    this._minute = (((m >= 0) && (m < 59)) ? m : 0);
    }
    public String toString()
    {
    ...
  23. Replies
    63
    Views
    4,455

    Re: Time Class problem

    1. Testing Constructors and toString:
    t1=17:45
    t2=17:45

    just help output this lines please and that will do enough
  24. Replies
    63
    Views
    4,455

    Re: Time Class problem

    Time1 t2 = new Time1(t1);
    System.out.println("\tt2=" + t2);

    first line appears to be an object which requires construct in the main class file
  25. Replies
    63
    Views
    4,455

    Re: Time Class problem

    so how can i duplicate the output ??? can you show me please
Results 1 to 25 of 32
Page 1 of 2 1 2