directory structure change, organize by class number as opposed to mod number
Signed-off-by: Amrit Panesar <apanesar@4195tech.com>
This commit is contained in:
1 parent
2a3d6fc042
commit
8683384387
480 files changed
+7
No files matched your search
@@ -0,0 +1,60 @@
|
||||
/******************************************************************************
|
||||
* Project: Project 4a *
|
||||
* Class Name: Project4a *
|
||||
* Author: Amrit Panesar -ASP ,o/ *
|
||||
* Last Edited: 09/10/2012 *
|
||||
* Hours: 0.20 Hours *
|
||||
* Purpose: Evaluate the input of a char representing the taxpayer's *
|
||||
* filing status and reporting weather the taxpayer will be *
|
||||
* taxed as a single or married person. *
|
||||
* *
|
||||
******************************************************************************/
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
public class Project4a
|
||||
{
|
||||
public static void main(String[] args) // main
|
||||
{
|
||||
System.out.println("Are you (M)arried (H)ead of Household or "
|
||||
+ "(S)ingle?");
|
||||
Scanner console = new Scanner(System.in);
|
||||
String sInput = console.next();
|
||||
char cStatus = sInput.toLowerCase().charAt(0);
|
||||
|
||||
if (cStatus != 'm' && cStatus != 'h' && cStatus != 's')
|
||||
{
|
||||
System.out.println("Invalid input \""+cStatus+"\", please re-run the program");
|
||||
System.exit(0);
|
||||
}
|
||||
if (cStatus != 'm')
|
||||
System.out.println("You are filing as Single");
|
||||
else
|
||||
System.out.println("You are filing as Married");
|
||||
}
|
||||
}
|
||||
|
||||
/* Output:
|
||||
|
||||
E:\programs\Mod1\Project 4>java Project4a
|
||||
Are you (M)arried (H)ead of Household or (S)ingle?
|
||||
m
|
||||
You are filing as Married
|
||||
|
||||
E:\programs\Mod1\Project 4>java Project4a
|
||||
Are you (M)arried (H)ead of Household or (S)ingle?
|
||||
h
|
||||
You are filing as Single
|
||||
|
||||
E:\programs\Mod1\Project 4>java Project4a
|
||||
Are you (M)arried (H)ead of Household or (S)ingle?
|
||||
s
|
||||
You are filing as Single
|
||||
|
||||
E:\programs\Mod1\Project 4>java Project4a
|
||||
Are you (M)arried (H)ead of Household or (S)ingle?
|
||||
4
|
||||
Invalid input "4", please re-run the program
|
||||
|
||||
*/
|
||||
Reference in new issue
Block a user