Got this question on my Java test. Can someone please clarify for me?
You can create concrete object from:
A) An abstract class
B) An Interface
C) Both A & B
D) None of Above
I said interface because I know that we can create an object of interface. But that word 'CONCRETE'??
samguan wrote:
You can create concrete object from:
A) An abstract class
B) An Interface
C) Both A & B
D) None of Above
I said interface because I know that we can create an object of interface. It depends on how you interpret the question. I'd say it's poorly worded. But, assuming it's not a trick question, the answer is D. And if you can "create a concrete object from" an interface, then you can also "create a concrete object from" an abstract class.
Similar Messages
-
at start up my choose application box appears with the question "what is null?" can someone enlighten me on what this is?
The third-party system modification "GoFlex" may be contributing to your problem. I suggest you back up all data, then uninstall it according to the developer's instructions. Reboot and see whether there's any improvement.
Back up all data before making any changes. -
My Macbook pro is acting Crazy....the Cursor just keeps on jumping everywhere and not responding when I use the trackpad....Even when it does respond it is very slow...I thought it was the trackpad acting up but realized it wasnt when i plugged in a mouse and it still did the same thing...this happened one other time and shortly after my computer froze...I had to restart for it to work but restarting dosent help this time...can someone please help?...Is this a Virus?
It is not a virus. See my Mac Virus Guide*.
As to what it might be, that's hard to say. You should try some basic troubleshooting... Repair the hard drive with disk utility. Boot in safe mode and see if it happens then, log in to a different user account and see if it happens there, reboot from another system and see if it happens.
Apparently some people have had this kind of problem caused by swelling batteries that push on the underside of the trackpad and cause all kinds of strange problems. Is your machine's underside deformed at all?
* Disclaimer: links to my pages may give me compensation, and should not be taken as endorsement of my services by Apple. -
I wrote an exam and this was one of the quest can someone please help.thx
The International Cricket Council has employed you to write a JAVA APPLICATION program to calculate batting averages. The Batsman with the highest batting average is going to get the BATSMAN OF THE YEAR AWARD.
Write a java program that
� uses an array to store 5 batting scores
� has a method to calculate the batting average and
� then creates 2 objects (i.e. 2 batsman) and determine which batsman has the higher average (this will be done in the main program).
Ensure that your program is properly structured.
No unnecessary code to be done in the main method.
Enter 5 batting scores for Batsman 1 [20, 30, 20, 30, 20]
Average : 60
Enter batting scores for Batsman 2 [20, 40, 20, 40, 10]
Average: 65
BATSMAN 2 IS BATSMAN OF THE YEAR!
Save this application program as: BATSMAN JavaHi Shri-Babaji, This is one of the question which I
answered in my exams and was asking you guys sothat I
could verify how I had fared. I am still new at Java
and thought I could ask but if that what you guys
think than sorry for asking!Ok, now you're saying you 'answered' it in the exam, or you are the one creating an exam? If you're creating an exam, I already tried to apologize for my remarks, but if in fact you are 'answering' an exam, then my original reply still holds, and this would be speaking for most of the community on these forums. -
My apologies if this has already been resolved or discussed.
I have spoken to numerous Apple employees and support people regarding if I can upgrade my Tiger 10.4.11 to Snow Leopard without having to buy the Box Set (which contains many useless programs). Apparently, Apple has conceded that it is possible and many people have said that it works great. My real concern is if whether it will effect my Applecare, etc. I would appreciate if anyone can clarify if it does in fact work and if anyone can pitch in if affect my warranty.
Thank you kindly.
JamieSoftware License Agreement for SL:
http://images.apple.com/legal/sla/docs/macosx106.pdf
Section 2A:
_Single Use License_. Subject to the terms and conditions of this License, unless you have purchased a Family Pack or Upgrade license for the Apple Software,
you are granted a limited non-exclusive license to install, use and run one (1) copy of the Apple Software on a single Apple-branded computer at a time. You
agree not to install, use or run the Apple Software on any non-Apple-branded computer, or to enable others to do so. This License does not allow the Apple
Software to exist on more than one computer at a time, and you may not make the Apple Software available over a network where it could be used by multiple
computers at the same time.
Says nothing about one's current/previous OS. It's an install, not an upgrade.
Section 2C talks about an "upgrade license", which refers to the $10 upgrade sold to people who bought their Macs after June 6th, does mention that you must have Leopard installed beforehand. This is not the case for the Single Use or Family Pack versions.
And it can't possibly void your computers warranty, since Snow Leopard didn't exist when you bought your computer. -
Hi All,
When I try to connect to wi-fi, it asks for a password. Then I got this question. If you don't know the password, check with the Wi-Fi network administrator, but how do I find the network administrator.Whomever provides the wi-fi.
To what wi-fi network are trying to connect? -
4th time I am trying to post this question!!! Why can't I watch season 5 episode 9 of Downton Abbey?? I have purchased a season pass and have watched all previous episodes. I can't watch on any of my devices. iMAC - iPad 3rd gen. - iPhone5
What happens when you try to watch it ?
-
I can't update my software because software update tells me I'm not connected to the internet... if that's true how am I able to ask this question?... Can anyone tell me what's going on and what I need to do to correct this?
If you have a slow connection speed, update will not download.
Are you using broadband and are you close to the modem? -
can someone please tell me if there is any problem if i download this. i am asking this question as i was in trouble when i had installed maverick [hard disk crashed]s
Well it does detect the camera, under USB in the System Profiler it says "FaceTime-HD-camera (built-in)". But the image distortion.
Since you can't see the image, here's a description: it shows horizontal lines all over the place in the image, and the lines are quite tall and they contain part of the image but moved horizontally to the left or right, and in a different color as well. So for example you could see part of my face but there is a horizontal bar where my eyes are located in, and it is moved to the left so that my eyes are at the left of my face. I hope that made some sense...
Will try to get to an Apple store next week. -
Can someone please test this widget?
Hi,
(sorry if this is in the wrong forum but I couldn't find a better place)
Can someone please try this widget?
http://www.apple.com/downloads/dashboard/information/speciesdistributionmap.html
The map shows on 2 out of 3 of the macs in the office but we can't determine why it doesn't work on the third... If you can see the map, then it works. We can't spot any difference in the settings on the machines
Many many thanks!
TimI have the i7-720 and the processor and I can attest to the W510 overheating. I recently had my planar replaced under warranty and it returned with an overheating issue for heavy processor loads. This overheating was resolved by properly applying thermal paste (lenovo applied about 3x as much as was needed) while the GPU continues to overheat and cause stuttering. If I run furmark in any resolution for a length of time at maximum fan speed and watch the GPU overheat, throttle, and overheat again. This would all be fine if it didn't cause the whole system to lag terribly in games or on the desktop.
In my view the design of the GPU cooler and thermal pads for the GPU memory cooling are very sensitive to installation. The cooler is easy to bend and the pressure clamp for the GPU isn't really designed to a certain tolerance. It's simply a clamp with a bent part that will apply some random amount of pressure to the gpu cooler.
It's just such a delicate system of cooling that there is too much room for error. It has to be installed correctly in order to function properly and I don't think there is really a good way of making sure that you've done it without running benchmarks for hours after reinstalling the cooler. I don't think this is something Lenovo is going to do. There aren't any options from Lenovo for a better heat sink design and I am pretty sure not everyone is having these issues.
So I'm going to mess with the GPU cooler until it starts working. Here's a furmark screenshot showing the temps.
Link to picture
Moderator note; picture(s) totalling >50K converted to link(s) Forum Rules -
Can someone please Interpret this EtreCheck for me? Macbook Pro Boot Time Really Slow.
Can someone please give me detailed instruction on what to do no next. I've read several forum discussion on this subject and seen various examples. i would like help with mine. Reason being is because my MBP boot up time is almost around 2-3mins long sometimes it can even be upto 5mins. reason i ask is because i know this is not normal. compared to my macbook (mid-2010) this is REALLY slow. And all the specs of my MBP should in theory make my MB a thing of the past. (Why i bought the MBP in the first place). i've done PRAM reset and booted in Safe Mode. i've removed several applications using the correct uninstalls where required.
i have ran a terminal commands to clear the kernal caches and got these results (not sure if it will help). And neither have made a difference.
Password:
macs-imac:~ SantiagoXG$ sudo kextcache -system-prelinked-kernel
kext com.paceap.kext.pacesupport.snowleopard 507029000 is in exception list, allowing to load
kext com.jmicron.JMicronATA 101069000 is in exception list, allowing to load
kext com.ATTO.driver.ATTOExpressSASRAID 307029000 is in exception list, allowing to load
kext com.ATTO.driver.ATTOExpressSASHBA3 100059000 is in exception list, allowing to load
kext com.ATTO.driver.ATTOExpressSASHBA 200009000 is in exception list, allowing to load
kext com.ATTO.driver.ATTOExpressPCIUl4 404029000 is in exception list, allowing to load
kext com.ATTO.driver.ATTOCelerityFC 304089000 is in exception list, allowing to load
kext com.Accusys.driver.Acxxx 300029000 is in exception list, allowing to load
macs-imac:~ SantiagoXG$ sudo kextcache -system-caches
Password:
macs-imac:~ SantiagoXG$
Below is the EtreCheck:
Hardware Information:
MacBook Pro (Retina, 15-inch, Early 2013)
MacBook Pro - model: MacBookPro10,1
1 2.7 GHz Intel Core i7 CPU: 4 cores
16 GB RAM
Video Information:
Intel HD Graphics 4000 - VRAM: 1024 MB
NVIDIA GeForce GT 650M - VRAM: 1024 MB
System Software:
OS X 10.9.1 (13B42) - Uptime: 0 days 0:13:15
Disk Information:
APPLE SSD SD256E disk0 : (251 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) / [Startup]: 250.01 GB (135.34 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
USB Information:
Apple Inc. FaceTime HD Camera (Built-in)
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Inc. BRCM20702 Hub
Apple Inc. Bluetooth USB Host Controller
FireWire Information:
Thunderbolt Information:
Apple Inc. thunderbolt_bus
Configuration files:
/etc/hosts - Count: 44
Kernel Extensions:
com.paceap.kext.pacesupport.snowleopard (5.7.2)
Launch Daemons:
[System] com.adobe.fpsaud.plist 3rd-Party support link
[System] com.adobe.SwitchBoard.plist 3rd-Party support link
[System] com.google.keystone.daemon.plist 3rd-Party support link
[System] com.maintain.AutoLoginUserScreenLocked.plist 3rd-Party support link
[System] com.maintain.CocktailScheduler.plist 3rd-Party support link
[System] com.oracle.java.Helper-Tool.plist 3rd-Party support link
[System] com.soma-zone.LaunchControl.Helper.plist 3rd-Party support link
[System] PACESupport.plist 3rd-Party support link
Launch Agents:
[System] com.google.keystone.agent.plist 3rd-Party support link
[System] com.maintain.LogOut.plist 3rd-Party support link
[System] com.maintain.Restart.plist 3rd-Party support link
[System] com.maintain.ShutDown.plist 3rd-Party support link
[System] com.maintain.Sleep.plist 3rd-Party support link
[System] com.maintain.SystemEvents.plist 3rd-Party support link
[System] com.oracle.java.Java-Updater.plist 3rd-Party support link
User Launch Agents:
[not loaded] com.adobe.ARM.[...].plist 3rd-Party support link
[not loaded] com.facebook.videochat.[redacted].plist 3rd-Party support link
[not loaded] com.nero.HSMMonitor.plist 3rd-Party support link
User Login Items:
WDDriveUtilityHelper
WDSecurityHelper
Internet Plug-ins:
DirectorShockwave: Version: 11.5.8r612 3rd-Party support link
Google Earth Web Plug-in: Version: 7.1 3rd-Party support link
Default Browser: Version: 537 - SDK 10.9
AdobeExManDetect: Version: AdobeExManDetect 1.1.0.0 - SDK 10.7 3rd-Party support link
Flip4Mac WMV Plugin: Version: 2.3.5.4 3rd-Party support link
OfficeLiveBrowserPlugin: Version: 12.3.6 3rd-Party support link
AdobePDFViewerNPAPI: Version: 10.1.9 3rd-Party support link
FlashPlayer-10.6: Version: 12.0.0.70 - SDK 10.6 3rd-Party support link
DivX Web Player: Version: 3.1.0.13 - SDK 10.5 3rd-Party support link
OVSHelper: Version: 1.1 3rd-Party support link
Flash Player: Version: 12.0.0.70 - SDK 10.6 3rd-Party support link
iPhotoPhotocast: Version: 7.0 - SDK 10.8
QuickTime Plugin: Version: 7.7.3
RealPlayer Plugin: Version: (null) 3rd-Party support link
AdobePDFViewer: Version: 10.1.9 3rd-Party support link
Silverlight: Version: 5.1.20913.0 - SDK 10.6 3rd-Party support link
JavaAppletPlugin: Version: Java 7 Update 51 3rd-Party support link
Safari Extensions:
Slick Savings: Version: 1.0
Searchme: Version: 1.2
Ebay Shopping Assistant: Version: 1.1
Amazon Shopping Assistant: Version: 1.1
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 1.9 - SDK 10.9
AppleAVBAudio: Version: 2.0.0 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
3rd Party Preference Panes:
Flash Player 3rd-Party support link
Flip4Mac WMV 3rd-Party support link
FUSE for OS X (OSXFUSE) 3rd-Party support link
Java 3rd-Party support link
M-AudioFastTrack 3rd-Party support link
MacFUSE 3rd-Party support link
NTFS-3G 3rd-Party support link
Perian 3rd-Party support link
Tuxera NTFS 3rd-Party support link
Old Applications:
SLLauncher: Version: 1.0 - SDK 10.5 3rd-Party support link
/Library/Application Support/Microsoft/Silverlight/OutOfBrowser/SLLauncher.app
/Library/Application Support/DivX
DivXUpdate: Version: 1.0 - SDK 10.5 3rd-Party support link
DivXMediaServer: Version: 10.1 - SDK 10.5 3rd-Party support link
DivXTransferWizard: Version: 10.1.0 (Build 10.1.0.102) - SDK 10.5 3rd-Party support link
DMSLaunch: Version: 1.0 - SDK 10.5 3rd-Party support link
Wondershare Helper Compact: Version: 2.2.6.0 - SDK 10.5 3rd-Party support link
/Applications/Wondershare Helper compact/Wondershare Helper Compact.app
SA Color Finesse 3 UI: Version: 3.0.6(275) - SDK 10.5 3rd-Party support link
/Applications/Adobe After Effects CS6/Plug-ins/Effects/Synthetic Aperture/(CF3 Support)/SA Color Finesse 3 UI.app
dynamiclinkmanager: Version: 6.0.0 - SDK 10.5 3rd-Party support link
/Library/Application Support/Adobe/Common/dynamiclink/CS6/dynamiclinkmanager.app
Microsoft AutoUpdate: Version: 2.3.6 - SDK 10.4 3rd-Party support link
/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app
dynamiclinkmediaserver: Version: 6.0.1 - SDK 10.5 3rd-Party support link
/Library/Application Support/Adobe/Common/dynamiclinkmediaserver/1.0/dynamiclinkmediaserver.app
DivX Player: Version: 10.1.0 (Build 11.3.0.40) - SDK 10.5 3rd-Party support link
DeTune: Version: 1.0.6 - SDK 10.5 3rd-Party support link
DivX Converter: Version: 10.1.0 (Build 10.1.0.166) - SDK 10.5 3rd-Party support link
Time Machine:
Mobile backups: OFF
Auto backup: NO - Auto backup turned off
Volumes being backed up:
Destinations:
SantiagoXG [Local] (Last used)
Total size: 0 B
Total number of backups: (null)
Size of backup disk: Excellent
Backup size 0 B > (Disk size 0 B X 3)
Time Machine details may not be accurate.
All volumes being backed up may not be listed.
Top Processes by CPU:
3% WindowServer
2% EtreCheck
0% WDDriveUtilityHelper
0% configd
0% imagent
Top Processes by Memory:
213 MB Dock
147 MB mds_stores
147 MB Google Chrome
147 MB com.apple.IconServicesAgent
131 MB Google Chrome Helper
Virtual Memory Information:
11.91 GB Free RAM
2.40 GB Active RAM
385 MB Inactive RAM
1.31 GB Wired RAM
405 MB Page-ins
0 B Page-outsIf you have more than one user account, these instructions must be carried out as an administrator.
Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
Step 1
Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
View ▹ Show Log List
from the menu bar.
Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time when you had the problem. Select the messages logged after the boot, during the time something abnormal was happening. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
For example, if the problem is a slow startup taking three minutes, post the messages timestamped within three minutesafter the boot time, not before. Please include the BOOT_TIME message at the beginning of the log extract.
If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
Please do not indiscriminately dump thousands of lines from the log into this discussion.
Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
Step 2
Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post any other kind of diagnostic report, such as hang logs — they're very long and not helpful. -
CAn Someone Please Help me? Turn this program in a algorithm
DECLARE SUB RentCar ()
DECLARE SUB PayBill ()
DECLARE SUB Main ()
DECLARE SUB ReadCarData ()
DECLARE SUB FindCar ()
TYPE Car ' User made Type To hold Car Data
CarNumber AS INTEGER
License AS STRING * 8
Year AS INTEGER
CarMaker AS STRING * 16
CarName AS STRING * 16
Description AS STRING * 20
ColorOfCar AS STRING * 10
NumberOfDoors AS INTEGER
Price AS DOUBLE
Rented AS INTEGER
Customer AS INTEGER
END TYPE
TYPE Customer ' User made Type to hold Customer data
CustomerNumber AS INTEGER
CustName AS STRING * 50
Bill AS DOUBLE
END TYPE
DIM SHARED Cars(1 TO 26) AS Car ' Global Variables
DIM SHARED p(4) AS Customer
DIM CustName AS STRING * 50
p(0).CustName = "Kevin" ' Assign Customers who need to pay bills
p(0).Bill = 0
p(1).CustName = "Eljah"
p(1).Bill = 100
p(2).CustName = "Jared"
p(2).Bill = 55
p(3).CustName = "Claudwin"
p(3).Bill = 60
p(4).CustName = "Isaac"
p(4).Bill = 1500
CALL ReadCarData ' This reads the data statements into the Cars() array.
WIDTH 80, 50 ' Formats screen and call the main part of the program
CALL Main
' CAR DATA STATEMENTS
' LICENSE YEAR MAKER MODEL DESCRIPTION COLOR DOORS PRICE
DATA "X-5687", 2007, "DODGE", "CALIBER", "FAMILY CAR", "DARK RED", 4, 89.99
DATA "X-9681", 2006, "DODGE", "CHARGER", "SPORT", "GREY", 4, 47.99
DATA "X-9684", 2006, "DODGE", "RAM 2500", "PICKUP", "BLACK", 4, 101.99
DATA "X-9437", 2004, "FORD", "MUSTANG", "SPORT", "RED", 2, 45.99
DATA "X-2562", 2002, "FORD", "TAURUS", "SEDAN", "LIGHT GREY", 4, 67.99
DATA "X-3856", 2003, "FORD", "CONTOUR", "SMALL", "LIGHT BLUE", 2, 45.99
DATA "X-2724", 2001, "FORD", "BRONCO", "JEEP", "BLACK", 4, 63.99
DATA "X-2724", 2001, "FORD", "BRONCO", "JEEP", "DARK GREEN", 4, 63.99
DATA "X-8568", 1998, "FORD", "ESCORT", "COMPACT", "BROWN", 2, 35.99
DATA "X-4724", 2004, "FORD", "PROBE", "SPORT", "BLACK", 2, 58.99
DATA "X-4724", 2004, "FORD", "PROBE", "SPORT", "RED", 2, 58.99
DATA "X-4724", 2004, "FORD", "PROBE", "SPORT", "YELLOW", 2, 58.99
DATA "X-4724", 2003, "FORD", "AEROSTAR", "S.U.V.", "DARK GREEN", 4, 87.99
DATA "X-2727", 1999, "PONTIAC", "GRAND AM", "SPORT CAR", "BLACK", 2, 45.99
DATA "X-2327", 1999, "PONTIAC", "GRAND AM", "SPORT CAR", "RED", 2, 45.99
DATA "X-2767", 1999, "PONTIAC", "GRAND AM", "SPORT CAR", "GREY", 2, 45.99
DATA "X-2723", 1999, "PONTIAC", "GRAND AM", "SPORT CAR", "PURPLE", 2, 45.99
DATA "X-8486", 2005, "PONTIAC", "TRANSPORT", "S.U.V.", "WHITE", 2, 96.99
DATA "X-3261", 2005, "PONTIAC", "AZTEC", "S.U.V.", "YELLOW", 4, 93.99
DATA "X-1864", 2006, "PONTIAC", "TORRENT", "S.U.V.", "RED", 4, 98.99
DATA "X-8521", 2006, "MERCURY", "COUGAR", "SPORT", "BLACK", 2, 69.99
DATA "X-8471", 2006, "LINCOLN", "TOWN CAR", "LUXURY", "BLACK", 4, 149.99
DATA "X-8635", 2001, "LINCOLN", "CONTINENTAL", "LUXURY", "GOLD", 4, 139.99
DATA "X-2643", 2006, "CHEVROLET", "F-150", "PICKUP", "GREY", 2, 95.99
DATA "X-7143", 2006, "CHEVROLET", "CORVETTE", "SPORT", "YELLOW", 2, 131.99
DATA "X-7378", 2006, "CHEVROLET", "MALIBU", "SEDAN", "BLACK", 4, 81.99
SUB FindCar ' This sub goes through the data to search for a car
DIM Counter AS INTEGER 'variables need for sub
DIM TempMaker AS STRING
DIM TempModel AS STRING
DIM TempColor AS STRING
DIM TempCarType AS STRING
DIM TempRangeFrom AS DOUBLE
DIM TempRangeTo AS DOUBLE
DIM TempMax AS DOUBLE
DIM TempMin AS DOUBLE
DIM LeaveFindCar AS INTEGER
DIM MoreCar AS STRING
DIM CanDisplay AS INTEGER
DO WHILE LeaveFindCar = 0 ' Main loop to find type of car
' Initialize the variables
Counter = 0
TempMaker = ""
TempModel = ""
TempColor = ""
TempRangeFrom = 0
TempRangeTo = 0
CLS ' Draw the screen with the search fields"
COLOR 15
PRINT "FIND IDEAL CAR: (Enter one or more of these items)"
PRINT STRING$(80, CHR$(196))
COLOR 11
PRINT "Car Builder:"
PRINT "Car Model:"
PRINT "Car Color:"
PRINT "Price Range: From: To:"
COLOR 10 ' GetsUser can enter any search fields he wants
LOCATE 3, 19
INPUT TempMaker
LOCATE 4, 19
INPUT TempModel
LOCATE 5, 19
INPUT TempColor
LOCATE 6, 19
INPUT TempRangeFrom
LOCATE 6, 36
INPUT TempRangeTo
COLOR 15
PRINT STRING$(80, CHR$(196))
CanDisplay = 0
FOR Counter = 1 TO 26 '' This loop does the actual search of the matching cars
'We compare all string type variables as an
'uppercase (UCASE$) and Right Trimmed (RTRIM$)
'to avoid having to compare upper and lower case
'Values, this makes the condtions here twice
'as short to perform.
IF RTRIM$(TempMaker) <> "" THEN
IF UCASE$(RTRIM$(Cars(Counter).CarMaker)) = UCASE$(RTRIM$(TempMaker)) THEN
IF RTRIM$(TempModel) <> "" THEN
IF UCASE$(RTRIM$(Cars(Counter).CarName)) = UCASE$(RTRIM$(TempModel)) THEN
IF RTRIM$(TempColor) <> "" THEN
IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
' If Price of car is in between Mininum and Maximum Price
'Allows to display the record.
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
END IF
ELSE
CanDisplay = 0
END IF
ELSE
' The IF is to set Min to the smallest of
' the range vales and TempMax to the biggest.
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
END IF
END IF
ELSE
CanDisplay = 0
END IF
ELSE
IF RTRIM$(TempColor) <> "" THEN
IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN
' This IF is to set Min to the smallest of
' the range values and Max to the biggest.
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
END IF
ELSE
CanDisplay = 0
END IF
ELSE
' The IF is to set Min to the smallest of
' the range vales and Max to the biggest.
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
ELSEIF TempRangeFrom = 0 AND TempRangeTo > 0 THEN ' The IF one of the range to be 0
TempMin = TempRangeFrom
TempMax = TempRangeTo
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
ELSEIF TempRangeFrom > 0 AND TempRangeTo = 0 THEN ' This IF one of the range to be 0
TempMin = TempRangeTo
TempMax = TempRangeFrom
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
ELSE
CanDisplay = 1
END IF
END IF
END IF
END IF
ELSE
'Same as previously, all string variables are UCASEd and
'RTRIMmed to shorten the comparison lenghts.
IF RTRIM$(TempModel) <> "" THEN
IF UCASE$(RTRIM$(Cars(Counter).CarName)) = UCASE$(RTRIM$(TempModel)) THEN
IF RTRIM$(TempColor) <> "" THEN
IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
' This IF is to setMin to the smallest of
' the range vales and Max to the biggest
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
END IF
ELSE
CanDisplay = 0
END IF
ELSE
' This IF is to setMin to the smallest of
' the range vales and Max to the biggest
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
END IF
END IF
ELSE
CanDisplay = 0
END IF
ELSE
IF RTRIM$(TempColor) <> "" THEN
IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN
' This IF is to setMin to the smallest of
' the range vales and Max to the biggest
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
ELSE
CanDisplay = 1
END IF
ELSE
CanDisplay = 0
END IF
ELSE
' This IF is to setMin to the smallest of
' the range vales and Max to the biggest
IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN
IF TempRangeFrom > TempRangeTo THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
ELSE
TempMin = TempRangeFrom
TempMax = TempRangeTo
END IF
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
ELSEIF TempRangeFrom = 0 AND TempRangeTo > 0 THEN
TempMin = TempRangeFrom
TempMax = TempRangeTo
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
ELSEIF TempRangeFrom > 0 AND TempRangeTo = 0 THEN
TempMin = TempRangeTo
TempMax = TempRangeFrom
IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN
CanDisplay = 1
ELSE
CanDisplay = 0
END IF
ELSE
CanDisplay = 1
END IF
END IF
END IF
END IF
IF CanDisplay = 1 THEN ' If car match fields entered it is displayed
COLOR 11
PRINT Cars(Counter).CarNumber;
PRINT " " + RTRIM$(Cars(Counter).License);
PRINT " - " + RTRIM$(Cars(Counter).CarMaker);
PRINT " " + RTRIM$(Cars(Counter).CarName);
PRINT " " + RTRIM$(Cars(Counter).Description);
PRINT " " + RTRIM$(Cars(Counter).ColorOfCar);
PRINT TAB(60); USING " $###.##"; Cars(Counter).Price
CanDisplay = 0
END IF
NEXT Counter ' displays line after listing cars
COLOR 15
PRINT STRING$(80, CHR$(196))
DO WHILE UCASE$(MoreCar) <> "Y" AND UCASE$(MoreCar) <> "N"
LOCATE CSRLIN, 1 ' This loop ask useers if they want another car search
PRINT "Find Another Car (Y/N)"
INPUT MoreCar
LOOP
IF UCASE$(MoreCar) = "N" THEN ' If user entered "n" the loop is exited
LeaveFindCar = 1
END IF
MoreCar = ""
LOOP
END SUB
SUB Main
' This SUB is the main part of the program. It displays
' the menu and accepts the choices from the user, when the
' user picks a valid value, it executes the proper choice
DO
CLS
COLOR 15
'print the menu on the screen
LOCATE 1, 33
PRINT "RENT CARS PLUS"
LOCATE 2, 1
PRINT STRING$(80, CHR$(196))
COLOR 11
PRINT " 1 - Pay Bill"
PRINT " 2 - Rent Car"
PRINT " 3 - Find Ideal Car"
PRINT " 999 - Exit"
COLOR 15
PRINT STRING$(80, CHR$(196))
INPUT "Choice: ", Choice ' The user enters his/her choice
IF Choice = 999 THEN END
IF Choice <> 999 AND Choice <> 1 AND Choice <> 2 AND Choice <> 3 THEN
PRINT " Error Please Enter Correct Choice! " ' If not valid answer user is asked to enter correct choice
END IF
SELECT CASE Choice ' This Select Case executes the subprograms options
CASE 1
CALL PayBill
CASE 2
CALL RentCar
CASE 3
CALL FindCar
CASE 5
END SELECT
LOOP UNTIL Choice = 999
END SUB
SUB PayBill' This sub does the bill paying process.
' it asks a few question to the user to get the right
' information and be able to pay the given bill.
DIM CustName AS STRING
DIM MoreBill AS INTEGER
DIM Answer AS STRING
DIM Flag AS INTEGER
COLOR 15
MoreBill = 0 ' To start loop variable
DO WHILE MoreBill = 0 ' Loop to start the Bill Paying Process
StartBill:
' Displays screen to user
CLS
COLOR 15
PRINT "PAY A BILL"
PRINT STRING$(80, CHR$(196))
INPUT "Customer Name: ", CustName ' user enters customer name
Flag = 0
FOR Q = 0 TO 4 ' Loops to search for customer name in array
IF UCASE$(RTRIM$(p(Q).CustName)) = UCASE$(RTRIM$(CustName)) THEN
Flag = 1
PRINT p(Q).CustName; p(Q).Bill
EXIT FOR
END IF
NEXT Q
'' If customer name invalid error message displayed
IF Flag = 0 THEN
PRINT "Invalid name. Press a key to try again."
DO WHILE INKEY$ <> "": LOOP
GOTO StartBill
END IF
MethodInput:
DO
LOCATE 4, 1 ' Display Payment methods and wait for user to pick one
COLOR 11
PRINT "We only use Visa or American Express. How do you wish to pay?"
PRINT "1 - Visa"
PRINT "2 - American Express"
PRINT "3 - Check"
PRINT "4 - Cash"
INPUT "Select 1, 2, 3, or 4: ", howtopay$ ' User enters way to pay
IF howtopay$ = "1" OR howtopay$ = "2" THEN ' CArd number asked for If american or visa
INPUT "Enter account number: ", cardnum$
ELSEIF howtopay$ <> "3" AND howtopay$ <> "4" THEN
PRINT "You must select method of payment."
END IF
LOOP WHILE howtopay$ < "1" OR howtopay$ > "4"
PaymentInput:
'' users enters payment amount
INPUT "Payment Amount (0 to cancel the transaction): ", PayAmount
IF PayAmount <> 0 THEN
IF PayAmount > p(Q).Bill THEN
'' If payment bigger than amount owed message displayed
PRINT "Payment is bigger than amount due. Press key to enter payment."
DO WHILE INKEY$ = "": LOOP
GOTO PaymentInput
ELSE
' If amount valid , payment subtracted from amount owed
p(Q).Bill = p(Q).Bill - PayAmount
PRINT "New balance is "; USING "$#####.##"; p(Q).Bill
END IF
END IF
'' Loop ask if user wishes to pay another bill
DO WHILE UCASE$(RTRIM$(Answer)) <> "Y" AND UCASE$(RTRIM$(Answer)) <> "N"
COLOR 15
LOCATE 48, 1
PRINT "Pay Another Bill (Y/N) ";
INPUT Answer
LOOP
IF UCASE$(RTRIM$(Answer)) = "N" THEN ' If answer is "N" then loop exited
MoreBill = 1
END IF
LOOP
END SUB
SUB ReadCarData
' This sub reads all data from the DATA statements
' And puts them in the Cars array
DIM Counter AS INTEGER
FOR Counter = 1 TO 26
Cars(Counter).CarNumber = Counter
READ Cars(Counter).License
READ Cars(Counter).Year
READ Cars(Counter).CarMaker
READ Cars(Counter).CarName
READ Cars(Counter).Description
READ Cars(Counter).ColorOfCar
READ Cars(Counter).NumberOfDoors
READ Cars(Counter).Price
NEXT Counter
END SUB
SUB RentCar
' This sub does the renting of a car
' to a customer. This ask several questions
' in order to get the right customer and the right
' car to rent then it rents it.
DIM MoreRent AS INTEGER
DIM TempCustomer AS INTEGER
DIM TempBill AS DOUBLE
DIM Answer AS STRING
DIM TempPrice AS DOUBLE
DIM TempInsurance AS DOUBLE
DIM CustName AS STRING
DIM Number AS STRING
DIM CarNumber AS INTEGER
DIM Days AS INTEGER
DIM Q AS INTEGER
MoreRent = 0 ' Loop for rental process
DO WHILE MoreRent = 0
InputName:
CLS ' Display screen to user
COLOR 15
PRINT "RENT A CAR"
PRINT STRING$(80, CHR$(196))
COLOR 11
LOCATE 3, 1
INPUT " Full Name: ", CustName ' user enters his name
IF RTRIM$(CustName) = "" THEN
PRINT "You Must Enter Your Name. Press a key to retry." ' User is told he must enter a name
DO WHILE INKEY$ = "": LOOP
GOTO InputName
ELSE
FOR Q = 0 TO 4
IF UCASE$(RTRIM$(p(Q).CustName)) = UCASE$(RTRIM$(CustName)) THEN
Flag = 1
PRINT p(Q).CustName; p(Q).Bill
TempCustomer = Q
EXIT FOR
END IF
NEXT Q
END IF
InputNumber:
LOCATE 5, 1
INPUT " Phone Number: ", Number ' User enters phone number
IF RTRIM$(Number) = "" THEN
PRINT "You Must a phone number. Press a key to retry." ' User is warned he must enter a number
DO WHILE INKEY$ = "": LOOP
GOTO InputNumber
END IF
CarInput:
LOCATE 7, 2
COLOR 11
INPUT "Car Number: ", CarNumber
' This awaits a car number from the user.
IF CarNumber < 1 AND CarNumber > 26 THEN ' If the car number is out of range, we warn and start again
PRINT "Car Number must be between 1 and 26. Press a key to retry."
DO WHILE INKEY$ = "": LOOP
GOTO CarInput
ELSE
' No need to search, we just display the car information
COLOR 14
PRINT RTRIM$(Cars(CarNumber).License) + " - ";
PRINT Cars(CarNumber).Year;
PRINT RTRIM$(Cars(CarNumber).CarMaker) + " " + RTRIM$(Cars(CarNumber).CarName) + " ";
PRINT RTRIM$(Cars(CarNumber).ColorOfCar)
PRINT "PRICE: "; USING "$####.##"; Cars(CarNumber).Price
END IF
DaysInput:
LOCATE 10, 1
COLOR 11
INPUT " Number of Days to rent: ", Days
' This awaits for a number of days to rent the car for.
IF Days < 1 AND Days > 31 THEN
PRINT "Days are 1 to 31. Press a key to retry."
' Can't have less than 1 day or more than a month or we warn.
DO WHILE INKEY$ = "": LOOP
GOTO DaysInput
END IF
TempPrice = Days * Cars(CarNumber).Price
' Calculate the Price of the rental
InsuranceInput:
LOCATE 13, 1
COLOR 11
DO WHILE UCASE$(RTRIM$(Answer)) <> "Y" AND UCASE$(RTRIM$(Answer)) <> "N"
COLOR 11
LOCATE 13, 1
PRINT "Add Insurance (Y/N)";
' the customer has the option to purchase insurance here.
INPUT Answer
LOOP
IF UCASE$(Answer) = "Y" THEN
COLOR 11
DO WHILE UCASE$(RTRIM$(Answer)) <> "F" AND UCASE$(RTRIM$(Answer)) <> "D"
'we loop until the users enters y or n
COLOR 11
LOCATE 14, 1
PRINT "(F)ixed Or (D)aily Amount";
' If the user selected yes, we ask for fixed or daily insurance amount.
INPUT Answer
LOOP
' if Fixed amount was picked we ask for that amount
IF UCASE$(RTRIM$(Answer)) = "F" THEN
INPUT "Fixed Insurance: ", TempInsurance
ELSE
TempInsurance = 15 * Days ' If Daily was picked we multiply 15 by the number of days rented
END IF
END IF
DO ' this loop asks for a payment method.
LOCATE 17, 1
PRINT "We only use Visa or American Express. How do you wish to pay?"
PRINT "1 - Visa"
PRINT "2 - American Express"
PRINT "3 - Check"
PRINT "4 - Cash"
INPUT "Select 1, 2, 3, or 4: ", howtopay$
IF howtopay$ = "1" OR howtopay$ = "2" THEN
INPUT "Enter account number: ", cardnum$
ELSEIF howtopay$ <> "3" AND howtopay$ <> "4" THEN
PRINT "You must select method of payment."
END IF
LOOP WHILE howtopay$ < "1" OR howtopay$ > "4"
COLOR 14
PRINT
' This part displays some totals to the user.
PRINT "Rental Price = "; USING "$##,###.##"; TempPrice
PRINT "Insurance Amount = "; USING "$##,###.##"; TempInsurance
PRINT "Total Price = "; USING "$##,###.##"; TempPrice + TempInsurance
PRINT " ----------"
TempBill = p(TempCustomer).Bill
TempBill = TempBill + (TempPrice + TempInsurance)
p(TempCustomer).Bill = TempBill
PRINT "New Balance = "; USING "$##,###.##"; TempBill
PRINT " =========="
Answer = ""
' This loop asks if the user wants to rent another car.
DO WHILE UCASE$(RTRIM$(Answer)) <> "Y" AND UCASE$(RTRIM$(Answer)) <> "N"
COLOR 15
LOCATE 48, 1
PRINT "Rent Another Car (Y/N) ";
INPUT Answer
LOOP
IF UCASE$(RTRIM$(Answer)) = "N" THEN
' If user selected N, we assign value to exit the loop
MoreRent = 1
END IF
LOOP
END SUB
Im really good at programming but really suck at algorithms can someone please please write in a algorithm form for me , i need it by friday i would greatly be thankful for uIm really good at programming but really suck at algorithms
>If your are 'really good' at programming, you will be able to solve this problem. Because, it has nothing to do with algorithm.
>>can someone please please write in a algorithm form for me , i need it by friday i would greatly be thankful for u
>Wrong person, in the wrong place. -
I just got my Ipad and I can not download apps. I get a message saying my Apple ID has been disabled. I have reset my password, I can access itunes and icloud but still can not download apps. Can someone please tell me how to get my ID activated? TY
Depending on why it's been disabled you might be able to re-enable it via this page : http://appleid.apple.com, then 'reset your password'
Or you might need to contact Apple : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page
If it then works on your computer's iTunes but not your phone/iPad then try logging out of your account on the phone/iPad by tapping on your id in Settings > Store (Settings > iTunes & App Stores on iOS 6) and then log back in and see if that 'refreshes' the account on it -
Dear All
The 'L' key on my macbook is still not functioning. I got a response from chrisfromhopewell and tried what he said, but its still not functioning. Can someone please assist me. I was using Universal Access before when I had visual problems so this might have caused the problem. but have turned universal access off, so I dont know what else to try. Can someone pleeeze help?
Thanks VeedeekayThanks King_Penguin for taking time to read and reply.
I just purchased this movie on Thursday, May 15, so just a few days ago. I have never had any trouble whatsoever since I have been in Vietnam. I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase.
Sorry, I don't quite understand what you mean by studios and different versions. Could you please explain?
I checked my purchased list in my purchase history under my account and there are no hidden items. -
Hi can someone please help, my imac crashed, when i try to start it up, it just beeps loudly 3 times, then there is a pause before it beeps 3 more times, this just continues to happen, any sugestions? please help
allanpar wrote:
i am having to use my laptop to post this question, missing my imac so much, its just not the same using this slow windows laptop.
Then maybe it's time to buy a new Windows notebook.
The RAM has either gone bad or somehow become unseated. Also there is the chance that the RAM slots have failed.
Maybe you are looking for
-
6.0.8.13 Patch 4 on RedHat 7.1
Hi, Have you had an idea where can i download from the patch 4 for Dev2000(forms/reports 6i) for RedHat 7.1.. as it is the only certified product? As regards the Dev2000 forms/reports 6i .. there is only one available http://www.oracle.com/technology
-
Enter (please Reply)
i want to make find menuItem i make it and the word i find is high lighted when i press The FindNext button in the JOptionPane the problem is that when i write in the JTextPane if i press Enter and then try to find a Specific word in the first line t
-
Can we replicate the sequence from primary to standby... using logical standby.
-
A recent error message says I can't print because I have no themes available. What is a theme and why do I need it. I just want to print. I now have to go to Preview to print my photos.
-
What about a camera for a mini?
Is there a third party camera that will connect with a Mini?