Jump to content

Noob To JAVA.Need Help

ExDreamer
Go to solution Solved by Wolfur,

I have taken class in java and have below statement as part of a question.I really did not understand this question so I did not know how to program this in java code.Any help would be appreciated.Thanks

 

The first one asks you to make a program asking the user for input:

 

[Which year was the year person X joined company?]

 

and then calculate ({current date, 2013 in this case} minus [input]).

 

 

 

 

The second one asks you to make a statement:

 

User inputs:

 

[How many students are in class A?]

 

[[How many students are in class B?]]

 

Calculate:

 

{[How many students are in class A?] + [[How many students are in class B?]]} = _something_

 

And display _something_ on the screen.

 

Both can be done using Integer fields.

I have taken class in java and have below statement as part of a question.I really did not understand this question so I did not know how to program this in java code.Any help would be appreciated.Thanks

 

 

 

1. Given the year in which a person joins a company, the YearOfService Wizard can compute the number of years they have been in service. Write statements that can be used in a Java program to perform this computation for the YearOfServiceWizard.

.

 

 

2. Write statements that can be used in a Java program to read the number of students present in two classes of a school as integers, and display the total number of students in that school. Your program statement should prompt the user to enter the number of students present in each class.   

 

Link to comment
Share on other sites

Link to post
Share on other sites

I have taken class in java and have below statement as part of a question.I really did not understand this question so I did not know how to program this in java code.Any help would be appreciated.Thanks

 

The first one asks you to make a program asking the user for input:

 

[Which year was the year person X joined company?]

 

and then calculate ({current date, 2013 in this case} minus [input]).

 

 

 

 

The second one asks you to make a statement:

 

User inputs:

 

[How many students are in class A?]

 

[[How many students are in class B?]]

 

Calculate:

 

{[How many students are in class A?] + [[How many students are in class B?]]} = _something_

 

And display _something_ on the screen.

 

Both can be done using Integer fields.

][ CPU: Phenom II x6 1045t @3,7GHz ][ GPU: GTX 660 2GB ][ Motherboard: Gigabyte GA-MA770T-UD3P ][ RAM: 8GB @1450Mhz CL9 DDR3 ][ PSU: Chieftec 500AB A ][ Case: SilentiumPC Regnum L50 ][ CPU Cooler: CoolerMaster Hyper 212 Evo & Arctic MX4 ][

Link to comment
Share on other sites

Link to post
Share on other sites

-snip-

Thanks.Now i know which part i should be working on.I will post the code here if i got any errors for help.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×