It looks like the spec is badly written
Although the method is called "printAll Nums" the spec does NOT say print the numbers, it says return a string (that could be printed).
So, don't be distracted by the misleading method name, just read the spec carefully and return "the string s, followed by a colon and a space, then followed by the number of times that string occurs in array b" (and you can then test it by printing the returned string)
So I am having trouble knowing what to return in the bottom method any help would be appreciated .
Here are the specifications for completing the StringArray class:
(a) In the class StringArray write method numInArray,using the method signature below. numInArray should return the number of times the string s occurs in array a.
For example, assume that array a is as shown below.
      
java is nice so nice it is
Here are some examples of calls to method numInArray.
Method call Returned value
numInArray(a, "java") 1
numInArray(a, "is") 2
numInArray(a, "nice") 2
numInArray(a, "ja") 0
Complete method numInArray below.
// postcondition: returns the number of times s occurs in a
public static int numInArray(String a, String s)
< your code goes here >
b) Again using the class StringArray write method printAllNums,using the method signature below. For every string s in array a, printAllNums should return the string s, followed by a colon and a space, then followed by the number of times that string occurs in array b. Use the \n control character to print a new line at the end of each line.
For example, assume that arrays a and b are as shown below.
   
a: ice cream is nice
      
b: java is nice so nice it is
The call printAllNums(a, b) should produce the following string:
We have an Access mdb database originally built in the late 90s. We currently use MS Access 2000 on Win7.
Since switching to win7 from XP the database keeps getting locked and corrupted and we are unable to open it. We then have to revert to backup copies made days before and lose lots of data. The database is around 36mb.
So does anyone know;
A) Is there any way to repair these locked/corrupted mdb files so we don’t lose data every time this happens.
And B) why this issue may be occurring in the first place. Are there known issues with office 2000 on win7?
So far google has failed to help me, hoping someone here may have some ideas!
Note due to the age of the DB we are unable to run it in any office version past 2000.
Sorry, but it does look like there's nobody around at the moment who can help you.
People do have very full and busy schedules, but with any luck someone with the necessary knowledge will get a free moment t help you.
Let's try the old user account issue/problem. Since you don't use a Microsoft Server and such my bet is you forgot to add that user and password to the faux Windows machine that hosts the database and serves up this access file.
That is, if I'm John, John will have an account on both machines.
Also, you have to deal with shares.
-> Frankly I found all this to be utter carp. Over a decade ago I dumped all that and went over to the dark side with MySQL. Never looked back.
Need code <copy of teacher's spec>? No.
You first need to learn to be polite and ask sensible questions.
You obviously ignored the "Read This Before Posting A Question" topic at the top of the page. Read it now, then start again and someone will help you.
Please help me about MenuStrip Control used.
I create a project there one parents form and two child form
MenuStripControl-1 is on parents form (main_form)
Menu Item name a) Trans. b)Report c) Setting
MenuStripControl-2 is on child form (purchase_Entry_Form)
Menu Item name a) File. b)Close
I want to when start the application (parents form (main_form)) then show MenuStripControl-1 menu Items only.
when run the child form (purchase_Entry_Form) then show MenuStripControl-2 menu Items only.
After closing child form(purchase_Entry_Form) then re show the parents form (main_form) MenuStripControl-1 menu Items only.
It is possible
please help me sir...
What I have tried:
If i Hide the MenuStripControl-1 the automatically hide MenuStripControl-2
write a program of two dimensional array in which roll number of the student are stored in first dimension and their marks in three different subjects are stored in second dimensional array creat a form in which a combo box is loaded with first dimension of array and when the user select any name of the student from combo box then marks of selected student should be changed in the below text box.
Yes - as above.
In fact all your loops and if/else blocks need brackets.
The code inside your loop line 15 will be executed for the "end of input" value (<=0), which will corrupt your results.
Also smallest is initialised to zero, so if (mark < smallest) will never be true.
Your main problem appears to be, you're using one loop, but expect it to return to 2 different places. Using one loop just for the first choice and a second loop for the second choice, will fix the immediate problem.
However, you should probably think about refactoring, and use a function to handle validating the inputs. Always remember that main should be just a jumping off point, not the whole program.
And I will add the following : in the begining, the first version of your code, it is recommanded to not mix actions; separate reading from checking. Read what you need to read then check the result in the while condition even if that means you need to put the same line twice (before and inside the loop block). The code will be easier to read and you can log (print) the content to check if it's correct.