Is there anyone in this group who would really help me out...
i need the output in alv.....anyone in this group plz help!!
Selection Screen:
Sales Org:
Sales document number:
YearPeriod: (Range) ( Mandatory) YYYYMM to YYYYMM
Output (Radio button)
- Screen
- Download
Report Output:
Sales Org:
Sales Doc number:
Forcast ID number:
Sales Document Type:
Net Value:
Currency:
Program Flow:
1) Read Function modules FIRST_DAY_IN_PERIOD_GET and LAST_DAY_IN_PERIOD_GET to ge the first and last dates of the periods entered on the selection screen. Here Year = First 4 characters and Period = Next two characters of YearPeriod field of the selection screen.
2) Read VBAK and filter all the sales documents where VBAK - AUART is ZJE or ZJR and VBAK AUDAT in the first and last dates of the periods detrmined from the above step.
3) For Each of the sales documents disply the following on the output
- Sales Org: VBAK VKORG ( Display on the output)
- Forcast ID Number: Read function module READ_TEXT where ID = Z001, Object = VBBK to get the Forcast ID. Display it on the output.
- Sales Document Type: VBAK-AUART
- Net Value: VBAK-NETWR
- Currency : VBAK-WAERK
3) For Each of the sales documents with VBAK-AURT = ZJE check the Revenue amount in TC in ZBLRV. Replace the vlaue VBAK-NETWR with REVTC and display the value in the report output.
this requirement looks very familiar. I already wrote a report for Minas....and something, last night, and now you have the same requirement? Strange......Are you working on the same project 'together'?
Similar Messages
-
In iTunes the iPhone device icon will not show up whenever I plug in a USB into my PC but the iPhone icon will show up in 'This PC' so if anyone who knows a resolution to my problem with my iTunes or PC,it would really help me.I need at least Help or some Tips.I have already tried many things to iTunes and my PC like trying to restore my PC but that do anything.Also,would it be fine if i contacted (call) Apple Support? Please,I need help because what I think is wrong is my PC,iPhone,or USB might be messed up so if anyone could help me with this,it would be really helpful and for anyone to be nice enough to help me.
I think this article will help you.
-
Is there anyone at all here who has successfully compiled and deployed an SSRS custom report item in VS2012? Is there a demo out there that actually works in VS2012? Is there anyone who has actually been able to compile and deploy that
apparently obsolete Polygons demo? (Pardon my impatience but I'm running a bit short of time here.)
After much hacking and googling I was able to get Polygons to compile but I still can't deploy it to the toolbox. ('The custom report item type PolygonsDesigner is not installed'). I've modified the RSReportDesigner.config
as instructed but I have no rssrvpolicy.config file on my local machine and
as yet I have no idea if that is necessary for local development.
In order to get it to compile I first added the reference C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.ReportingServices.ProcessingCore.dll to both projects.
To the PolygonsDesigner Project I also added the references:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.ReportDesigner.Controls.dll
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.ReportingServices.Designer.11.0.dll
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\Microsoft.ReportingServices.Interfaces.dll
Are these the correct references?
Exactly what software do you need installed on your local machine in addition to VS2012 in order to create a custom control?
(Designer.11.0 was added per the instructions in reference: https://connect.microsoft.com/VisualStudio/feedback/details/783391/unable-to-integrate-previously-working-ssrs-custom-report-item-to-vs-2012s-toolbox
After that I added the alias RSDesigner to it's properties and extern alias RSDesigner; at the top of the PolygonsDesigner.cs file. )
As of now, the top of the PolygonsDesigner.cs is as follows. I don't recall making any other changes to the code. As far as I can remember this is all I did in order to be able to compile the code in VS2012.
extern alias RSDesigner;
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.ReportDesigner;
using Microsoft.ReportDesigner.Design;
using Microsoft.ReportingServices.Interfaces;
using Microsoft.ReportingServices.RdlObjectModel;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.XPath;
[LocalizedName("Polygons")]
[Editor(typeof(CustomEditor), typeof(ComponentEditor))]
[ToolboxBitmap(typeof(PolygonsDesigner), "Polygons.ico")]
[CustomReportItem("Polygons")]
[ToolboxItem(typeof(RSDesigner::Microsoft.ReportDesigner.Shell.CRIToolboxItem))]
[System.CLSCompliant(false)]
public class PolygonsDesigner : CustomReportItemDesigner
{ etc...Just fixed this myself.
It appears the documentation online is wrong and the sample code is missing a reference to a reporting services dll and an attribute.
What you need to do to get it working in VS2012 is add a reference to: Microsoft.ReportingServices.designer.11.0.dll to the PolygonsDesigner project and then add the following attribute to the PolygonsDesigner class: [ToolboxItem(typeof(Microsoft.ReportDesigner.Shell.CRIToolboxItem))]
I also removed the [System.CLSCompliant(false)] attribute.
You then recompile and place both dlls in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies directory and the PolygonsDesigner.dll into the C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin
or what ever is you reporting services path.
You also need to change the Microsoft example for the rereportserver.config file to:
<ReportItemDesigner>
<ReportItem Name="Polygons" Type="Microsoft.Samples.ReportingServices.PolygonsDesigner, PolygonsDesigner" />
</ReportItemDesigner>
<ReportItems>
<ReportItem Name="Polygons" Type="Microsoft.Samples.ReportingServices.PolygonsCRI,PolygonsCRI"/>
</ReportItems>
Notice that I changed the namespaces and class to what is in the actual code so if you change it make sure you change it here.
And here in the RSReportDesigner.config:
<ReportItems>
<ReportItem Name="Polygons" Type="Microsoft.Samples.ReportingServices.PolygonsCustomReportItem,PolygonsCRI" />
</ReportItems>
<ReportItemDesigner>
<ReportItem Name="Polygons" Type="Microsoft.Samples.ReportingServices.PolygonsDesigner, PolygonsDesigner" />
</ReportItemDesigner>
<ReportItemConverter>
<Converter Source="Chart" Target="Polygons" Type="PolygonsCRI.PolygonsConverter, PolygonsDesigner" />
</ReportItemConverter>
Notice I haven't changed the last part as I didn't know what the PolygonsCRI.PolygonsConverter was.
And make sure the rssrvpolicy.config looks like this:
<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Description="This code group grants PolygonsCRI.dll FullTrust permission. ">
<IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.SQLSERVER\Reporting Services\ReportServer\bin\PolygonsCRI.dll" />
</CodeGroup>
After a restart of ssrs and relaunch of VS2012 I opened a test project and added the PolygonsDesigner.dll to the toolbox and it works.
Jamie -
Hi. This is my first time posting. My Macbook Pro with Os X Mavericks has been running super slow since before I installed Mavericks so I'm pretty sure it's not the OS that has the problem. It runs slow even if only one app is open, especially if it's a browser, particulary google chrome. If mail is open...forget about it, down to a crawl. I don't know how to read Etrecheck, but was hoping someone who does can help me out. Would be super grateful. :-)
P.S. - Also, it sounds like something is loose inside my mac. How should I proceed?
Thanks in advance.
Hardware Information:
MacBook Pro (13-inch, Late 2011)
MacBook Pro - model: MacBookPro8,1
1 2.8 GHz Intel Core i7 CPU: 2 cores
4 GB RAM
Video Information:
Intel HD Graphics 3000 - VRAM: 384 MB
System Software:
OS X 10.9.2 (13C1021) - Uptime: 0 days 23:21:37
Disk Information:
APPLE HDD HTS547575A9E384 disk0 : (750.16 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) / [Startup]: 749.3 GB (603.2 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
MATSHITADVD-R UJ-8A8
USB Information:
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. FaceTime HD Camera (Built-in)
Apple Computer, Inc. IR Receiver
Thunderbolt Information:
Apple Inc. thunderbolt_bus
Gatekeeper:
Mac App Store and identified developers
Kernel Extensions:
[not loaded] com.leapfrog.driver.LfConnectDriver (1.8.0 - SDK 10.7) Support
[not loaded] com.seagate.driver.PowSecDriverCore (5.0.1) Support
[not loaded] com.seagate.driver.PowSecLeafDriver_10_4 (5.0.1) Support
[not loaded] com.seagate.driver.PowSecLeafDriver_10_5 (5.0.1) Support
[not loaded] com.seagate.driver.SeagateDriveIcons (5.0.1) Support
Problem System Launch Daemons:
[failed] com.apple.wdhelper.plist
Problem System Launch Agents:
[loaded] com.paragon.NTFS.auth.plist Support
Launch Daemons:
[loaded] com.adobe.fpsaud.plist Support
[loaded] com.google.keystone.daemon.plist Support
[loaded] com.leapfrog.connect.shell.plist Support
[loaded] com.macpaw.CleanMyMac2.Agent.plist Support
[loaded] com.microsoft.office.licensing.helper.plist Support
[running] com.sophos.autoupdate.plist Support
[running] com.sophos.intercheck.plist Support
[running] com.sophos.notification.plist Support
Launch Agents:
[not loaded] com.adobe.AAM.Updater-1.0.plist Support
[loaded] com.google.keystone.agent.plist Support
[running] com.seagate.SeagateStorageGauge.plist Support
[running] com.sophos.uiserver.plist Support
[running] org.chromium.chromoting.plist Support
User Launch Agents:
[loaded] com.adobe.AAM.Updater-1.0.plist Support
[loaded] com.adobe.ARM.[...].plist Support
[failed] com.adobe.ARM.[...].plist Support
[loaded] com.facebook.videochat.[redacted].plist Support
[loaded] com.macpaw.CleanMyMac2Helper.diskSpaceWatcher.plist Support
[loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist Support
[loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist Support
User Login Items:
Activity Monitor
Dropbox
Google Drive
younity
EvernoteHelper
Internet Plug-ins:
o1dbrowserplugin: Version: 5.2.4.18058 Support
nplastpass: Version: 2.5.5 Support
Default Browser: Version: 537 - SDK 10.9
AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 Support
FlashPlayer-10.6: Version: 13.0.0.206 - SDK 10.6 Support
Silverlight: Version: 5.1.20125.0 - SDK 10.6 Support
Flash Player: Version: 13.0.0.206 - SDK 10.6 Support
QuickTime Plugin: Version: 7.7.3
googletalkbrowserplugin: Version: 5.2.4.18058 Support
SharePointBrowserPlugin: Version: 14.4.1 - SDK 10.6 Support
AdobePDFViewer: Version: 11.0.06 - SDK 10.6 Support
JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
Safari Extensions:
Slick Savings: Version: 1.0
Slick Savings: Version: 1.0
Surfon: Version: 1.2.2
Pearltrees Extension: Version: 6.0.13
Mindomo Bookmarks: Version: 1.0
Ebay Shopping Assistant: Version: 1.1
Zootool: Version: 0.7
Amazon Shopping Assistant: Version: 1.1
Pocket: Version: 1.7.1
Searchme: Version: 1.3
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
User iTunes Plug-ins:
TuneUp Visualizer: Version: 2.4.0 - SDK 10.6 Support
User Internet Plug-ins:
Picasa: Version: 1.0 - SDK 10.4 Support
3rd Party Preference Panes:
remoting_host_prefpane Support
Flash Player Support
Paragon NTFS for Mac ® OS X Support
Time Machine:
Mobile backups: ON
Auto backup: YES
Volumes being backed up:
Macintosh HD: Disk size: 697.84 GB Disk used: 136.06 GB
Destinations:
NO NAME [Local] (Last used)
Total size: 3.41 GB
Total number of backups: (null)
Size of backup disk: Too small
Backup size 3.41 GB < (Disk used 136.06 GB X 3)
Time Machine details may not be accurate.
All volumes being backed up may not be listed.
Top Processes by CPU:
6% Activity Monitor
5% WindowServer
1% InterCheck
1% sysmond
0% ocspd
Top Processes by Memory:
152 MB Finder
115 MB HelpViewer
111 MB mds_stores
86 MB InterCheck
57 MB WindowServer
Virtual Memory Information:
983 MB Free RAM
1.03 GB Active RAM
584 MB Inactive RAM
1.01 GB Wired RAM
17.41 GB Page-ins
222 MB Page-outsLaunch 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.
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.
Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
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. -
I just got a MacBook Pro and when I was setting up I got this voice over thing to help me out...I now can't get rid of it and it is driving me crazy...can anyone help?
System Preferences > Universal Access. Turn off Voice Over in the "Seeing" tab:
-
hello am dominic and i want a help from you guys out there i hope you will be able to help me out...i have an i phone which i bought from a friend but it has this i cloud account i wanna know if you can help me wipe it so i can usse it..thanks
Only your friend can unlock it, either by giving you his Apple ID and password, or by removing it from his list of devices - please see:
http://support.apple.com/kb/TS4515
There is no way at all it can be unlocked without his doing this. -
I am trying to instal the latest version of iTunes onto my MacBook Pro, but my computer has been "configuring" the installation since 5pm yesterday and now it is 10:30am. It has never done this before. Can anybody help me out?
Many thanks b Noir
This is a copy of ONEof the keys in the registry I changed as told by Apple support today. I also have changed others as instructed by GEAR software support to manually delete GEAR drivers (that I had installed but couldn't delete some of the others they mentioned from Windows system 32. Then some bright spark at work told me I need the Gear drivers so I downloaded the software and installed again.
Sorry, just this minute went to insert image and it is giving me a message saying this sort of content is not allowed?.
The most recent key I altered is in: HKey _local _machine. System\class - 4D36E965-E325-11CEBFC1-08002BE10318. Upper Filter data: Upper filter NTIDrvr SiRem GEARAspiWDN.
The GEARsoftware info about manually deleting GEAR drive is from:
http://www.gearsoftware.com/wiki/index.php?title=DRIVERS:_Windows_-_Updating%2C_ removing%2C_64_bit_versions%2C_etc
I hope you can help -
i try to conect my iphone to my mercedes 2008 e 350 and it said insert phone would anybody help me out ?
same problem here as well
-
MY new Mac book pro will not save any of teh bookmarks I make in safari. If I make a bookmark, it will not appear until I close safari and reopen it. Then, if I shut my computer down and reopen safari, all of the bookmarks are gone. This has happend multiple times and I don't know what is going on. I would really like to use my bookmarks.
Delete the
com.apple.safari.plist
reboot and start Safari, reset your preferences, instructions are here
Deleting the System Preference or other .plist file -
Hello all
i'm a first time user with java...my editor is Visual J++ (trial ed)...i'm testing out java to see if i want to use this for my company. for the past 4 days i've been trying to figure out how to connect to a database (i'm using MS SQL SERVER 2K) i've already posted in the JDBC Fourm...but found no answer...I apologize if I'm posting in 2 different forums at same time...but you gotta feel me on this, over 4 days on just trying to connect is not healthy LOL....
I already downloaded the driver from MS. Installed it followed the user guide (acrobat pdf file) on how to implement it...but i'm still stuck and haven't reached no where....what i want to do is a simple select statement but i can't do that without connecting first....maybe one of you out there has a sample code who uses MS SQL SERVER 2K...or someone can just be a miracle and help out on my code....the code will be attached below
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class AccessApp extends Frame
TextField driver = new TextField(80);
TextField url = new TextField(80);
TextField sql = new TextField(80);
Button doIt = new Button("Do it!");
TextArea resultArea = new TextArea(10,60);
public static void main(String args[])
AccessApp app = new AccessApp();
public AccessApp()
super("AccessApp");
setup();
pack();
addWindowListener(new WindowEventHandler());
show();
void setup()
setupMenuBar();
setLayout(new GridLayout(2,1));
Panel topPanel = new Panel();
topPanel.setLayout(new GridLayout(4,1));
Panel panels[]=new Panel[4];
for(int i=0;i<panels.length;++i)
panels=new Panel();
panels[i].setLayout(new FlowLayout(FlowLayout.LEFT));
panels[0].add(new Label("Driver:"));
panels[0].add(driver);
panels[1].add(new Label("URL: "));
panels[1].add(url);
panels[2].add(new Label("SQL: "));
panels[2].add(sql);
doIt.addActionListener(new ButtonHandler());
panels[3].add(doIt);
for(int i=0; i<panels.length; ++i)
topPanel.add(panels[i]);
add(topPanel);
add(resultArea);
void setupMenuBar()
MenuBar menuBar = new MenuBar();
Menu fileMenu = new Menu("File");
MenuItem fileExit = new MenuItem("Exit");
fileExit.addActionListener(new MenuItemHandler());
fileMenu.add(fileExit);
menuBar.add(fileMenu);
setMenuBar(menuBar);
void accessDB()
try
Class.forName(driver.getText()).newInstance();
Connection connection=DriverManager.getConnection(url.getText());
Statement statement = connection.createStatement();
boolean hasResults = statement.execute(sql.getText());
if(hasResults)
ResultSet result = statement.getResultSet();
if(result!=null) displayResults(result);
else resultArea.setText("");
connection.close();
catch(Exception ex)
resultArea.setText(ex.toString());
void displayResults(ResultSet r) throws SQLException
ResultSetMetaData rmeta = r.getMetaData();
int numColumns=rmeta.getColumnCount();
String text="";
for(int i=1; i<=numColumns; ++i)
if(i<numColumns)
text+=rmeta.getColumnName(i)+" | ";
else
text+=rmeta.getColumnName(i);
text+="\n";
while(r.next())
for(int i=1;i<=numColumns;++i)
if(i<numColumns)
text+=r.getString(i)+" | ";
else
text+=r.getString(i).trim();
text+="\n";
resultArea.setText(text);
class ButtonHandler implements ActionListener
public void actionPerformed(ActionEvent ev)
String s=ev.getActionCommand();
if(s=="Do it!") accessDB();
class MenuItemHandler implements ActionListener
public void actionPerformed(ActionEvent ev)
String s=ev.getActionCommand();
if(s=="Exit")
System.exit(0);
class WindowEventHandler extends WindowAdapter
public void windowClosing(WindowEvent e)
System.exit(0);
I hope this helps
and hopefully someone will respondFirst use JPanel not Panel.
Panel panels[]=new Panel[4];becomes
JPanel panels[]=new JPanel[4];Then refactor your code so that you use arrays correctly:
panels=new Panel();
panels.setLayout(new FlowLayout(FlowLayout.LEFT));becomes
panels=new JPanel();
panels[i].setLayout(new FlowLayout(FlowLayout.LEFT));
I did the above changes to your code and it worked fine.
Dave -
Really need help on how to write this program some 1 plz help me out here.
i am new to java and i confused on how to be writing this program.
i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.
Part I
An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
Here is an algorithm that calculates the cost of a rectangular window. The
total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
square inch (area) and the metal frame is 75 cents per inch (perimeter).
The length and width of the window will be entered by the user. The
output of the program should be the length and width (entered by the user)
and the total cost of the window.
FORMULAS:
area = length times width perimeter = 2 times (length plus width)
Here is the corresponding algorithm:
read in the length of the window in inches
read in the width of the window in inches
compute the area
compute the cost of the glass (area times 50 cents)
compute the perimeter
compute the cost of the frame (perimeter times 75 cents)
compute the total cost of the window (cost of glass plus cost of frame)
display the length, width and total cost
The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
length = 10
width = 20
area = 200, glass cost= 100.00 (area times 50 cents)
perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
total cost =145.00
Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
necessary to re-check your hand calculations.
Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
?Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.?
Part II
Write, compile and execute a Java program that displays the following prompts:
Enter an integer.
Enter a second integer
Enter a third integer.
Enter a fourth integer.
After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
(labels).
Sample Test Data:
Set 1: 100 100 100 100
Set 2: 100 0 100 0
Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.
Part III
Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)
For Part 1 this is what i got
import java.util.Scanner;
public class Window
public static void main(String[] args)
double length, width, glass_cost, perimeter, frame_cost, area, total;
Scanner keyboard = new Scanner (System.in);
System.out.println("Enter the length of the window in inches");
length = keyboard.nextInt();
System.out.println("Enter the width of the window in inches");
width = keyboard.nextInt();
area = length * width;
glass_cost = area * .5;
perimeter = 2 * (length + width);
frame_cost = perimeter * .75;
total = glass_cost + frame_cost;
System.out.println("The Length of the window is " + length + "inches");
System.out.println("The Width of the window is " + length + "inches");
System.out.println("The total cost of the window is $ " + total);
Enter the length of the window in inches
5
Enter the width of the window in inches
8
The Length of the window is 5.0inches
The Width of the window is 5.0inches
The total cost of the window is $ 39.5
Press any key to continue . . .
Edited by: Adhi on Feb 24, 2008 10:33 AMAdhi wrote:
i am new to java and i confused on how to be writing this program.
i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.Looks like homework to me.
What have you written so far? Post it.
Part I
An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
Here is an algorithm that calculates the cost of a rectangular window. The
total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
square inch (area) and the metal frame is 75 cents per inch (perimeter).
The length and width of the window will be entered by the user. The
output of the program should be the length and width (entered by the user)
and the total cost of the window.
FORMULAS:
area = length times width perimeter = 2 times (length plus width)
Here is the corresponding algorithm:
read in the length of the window in inches
read in the width of the window in inches
compute the area
compute the cost of the glass (area times 50 cents)
compute the perimeter
compute the cost of the frame (perimeter times 75 cents)
compute the total cost of the window (cost of glass plus cost of frame)
display the length, width and total cost
The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
length = 10
width = 20
area = 200, glass cost= 100.00 (area times 50 cents)
perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
total cost =145.00
Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
necessary to re-check your hand calculations.
Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
“Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.”
Part II
Write, compile and execute a Java program that displays the following prompts:
Enter an integer.
Enter a second integer
Enter a third integer.
Enter a fourth integer.
After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
(labels).
Sample Test Data:
Set 1: 100 100 100 100
Set 2: 100 0 100 0
Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.So this is where you actually have to do something. My guess is that you've done nothing so far.
Part III
Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)Man, this specification writes itself. Sit down and start coding.
One bit of advice: Nobody here takes kindly to lazy, stupid students who are just trying to con somebody into doing their homework for them. If that's you, better have your asbestos underpants on.
% -
All the photos from my computer were transferred to my iphone. I don't know what I did to make that happen and I can't even delete them from my phone. I had to reset and restore my phone to original settings and lost all my iphone photos and contacts and messeges. Has this happened to anyone who might know how to fix this or next time I sync my iphone to prevent the photos from my computer from downloading onto my phone?
You delete them the same way you put them there. The sync process. Open itunes, connect iphone, select what you want on the iphone, sync
Click Support at the top of this page, then click Manuals, for a copy of the manual -
I recently got an Ipad 2 as well as an ipod touch. I have 2 laptops at home that I have synced the devices with, one is running vista and the other XP. Both of the computers are now running really slow and when I checked my CPU usage it is showing that mobile dvice manager is using around 50% of my CPU and it is constantly running in the background. I am wondering of anyone has any suggestions on how to keep dvive manager from running when my Ipad is not even connected to the computer.
I recently got an Ipad 2 as well as an ipod touch. I have 2 laptops at home that I have synced the devices with, one is running vista and the other XP. Both of the computers are now running really slow and when I checked my CPU usage it is showing that mobile dvice manager is using around 50% of my CPU and it is constantly running in the background. I am wondering of anyone has any suggestions on how to keep dvive manager from running when my Ipad is not even connected to the computer.
-
I recently installed the overdrive media console. I was able to down e books and mp3 books but when I tried to down wma books. A message flashes out that the omc that I installed from the apps store is unsupported format. The version of omc does not support wma audiobook titles. Any suggestions.
DaphneWMA stands for Windows Media Audio...it is a Microsoft audio format that is not supported on the Mac or iOS version of the apps. If you want to use the WMA audiobooks, you will have to use the Windows desktop app. You can use MP3 audiobooks on any version of the app.
-
Are there features in PSE 10 that would be helpful for...
I want to be able to more easily edit newborn images, specifically softening their skin and making their ruddy skin more creamy. Are there features in PSE10 which would make this easier, or does PSE 7 have the features I need? Also, are there seminars/classes/tutorials which would help my learning curve? I so appreciate all the helpful people on this forum!
The short answer is "Yes", PSE10 will make it easier to do the retouching you want to do for newborn photos:
It has an "Adjust Color for Skin Tone" function which will help reduce the reddish colour.
It has a Guided Edit for portraits which might give you a nice starting point for further retouching.
Most importantly (as Barbara alluded to), it allows you to instantly create a mask for a layer; which will speed up the retouching procedure.
Don't get me wrong, you'll still need to do a lot of work, but PSE10 will make that work easier.
Ken
Maybe you are looking for
-
How to send PDF file as an attachment in email?
Hi Folks, I have successfully configured SMTP and by now I can successfully send normal text messages along with .TXT files. However, when I am trying to send an email along with .pdf file as an attachment, I am getting the mail in my inbox, but I ca
-
Could not complete the command because there is not enough RAM
i have already made a few changes to an image but when i try to Distort>Wave then click ok it comes up with that message. i have looked on other forums which say to allocate more memory to photoshop but that doesn't work for me. Any ideas?
-
Using my old iMac hard drive as an external to my macbook pro
hi I was wondering whether it's ok to use my imac's drive as an external hd for my new macbook. You see, my imac had some trouble with the power supply and i decided not to fix it. Instead, I took out the drive and put it in a case so to use as an ex
-
New Mac Mini - Existing Wireless Network - Can't Connect
I have an existing wireless network that works fine with an iBook G3. I just hooked up my Mac Mini and it can see the network, but it can't connect. The menu of available networks on the Mac Mini is also much more limited than that of the iBook. Is t
-
Retaining Tag Colors on Export to PDF
Hello! I've tried to Export As>Adobe PDF in several ways but all the Tags come out bold/black instead of their specified colors. If I print a PDF, all colors are correct but the file is ~32x larger. Is there something I'm missing? Emailing smaller