Information Systems homework help

Information Systems homework help

U6A1_ConsoleRegisterForCourse/build.xml
Builds, tests, and runs the project U6A1_ConsoleRegisterForCourse.
U6A1_ConsoleRegisterForCourse/build/classes/.netbeans_automatic_build
U6A1_ConsoleRegisterForCourse/build/classes/.netbeans_update_resources
U6A1_ConsoleRegisterForCourse/build/classes/u6a1_consoleregisterforcourse/U6A1_ConsoleRegisterForCourse.class
package u6a1_consoleregisterforcourse;
public synchronized class U6A1_ConsoleRegisterForCourse {
public void U6A1_ConsoleRegisterForCourse();
public static void main(String[]);
public static int getChoice(java.util.Scanner);
public static int ValidateChoice(int, int, int, int, int);
public static void WriteCurrentRegistration(int, int, int);
public static String ChoiceToCourse(int);
}
U6A1_ConsoleRegisterForCourse/manifest.mf
Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build

U6A1_ConsoleRegisterForCourse/nbproject/build-impl.xml
Must set src.dir Must set test.src.dir Must set build.dir Must set dist.dir Must set build.classes.dir Must set dist.javadoc.dir Must set build.test.classes.dir Must set build.test.results.dir Must set build.classes.excludes Must set dist.jar Must set javac.includes No tests executed. Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
U6A1_ConsoleRegisterForCourse/nbproject/genfiles.properties
build.xml.data.CRC32=4e521be5 build.xml.script.CRC32=1c0e423d build.xml.stylesheet.CRC32=8064a381@1.79.1.48 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=4e521be5 nbproject/build-impl.xml.script.CRC32=ce76d38f nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48

U6A1_ConsoleRegisterForCourse/nbproject/private/private.properties
compile.on.save=true user.properties.file=C:\\Users\\omora\\AppData\\Roaming\\NetBeans\\8.1\\build.properties

U6A1_ConsoleRegisterForCourse/nbproject/private/private.xml
U6A1_ConsoleRegisterForCourse/nbproject/project.properties
annotation.processing.enabled=true annotation.processing.enabled.in.editor=false annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=build build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here: build.sysclasspath=ignore build.test.classes.dir=${build.dir}/test/classes build.test.results.dir=${build.dir}/test/results # Uncomment to specify the preferred debugger connection transport: #debug.transport=dt_socket debug.classpath=\ ${run.classpath} debug.test.classpath=\ ${run.test.classpath} # Files in build.classes.dir which should be excluded from distribution jar dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/U6A1_ConsoleRegisterForCourse.jar dist.javadoc.dir=${dist.dir}/javadoc excludes= includes=** jar.compress=false javac.classpath= # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false javac.external.vm=true javac.processorpath=\ ${javac.classpath} javac.source=1.8 javac.target=1.8 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} javac.test.processorpath=\ ${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} javadoc.noindex=false javadoc.nonavbar=false javadoc.notree=false javadoc.private=false javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= main.class=u6a1_consoleregisterforcourse.U6A1_ConsoleRegisterForCourse manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} # Space-separated list of JVM arguments used when running the project. # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. # To set system properties for unit tests define test-sys-prop.name=value: run.jvmargs= run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} source.encoding=UTF-8 src.dir=src test.src.dir=test

U6A1_ConsoleRegisterForCourse/nbproject/project.xml
org.netbeans.modules.java.j2seproject U6A1_ConsoleRegisterForCourse
U6A1_ConsoleRegisterForCourse/src/u6a1_consoleregisterforcourse/U6A1_ConsoleRegisterForCourse.java
U6A1_ConsoleRegisterForCourse/src/u6a1_consoleregisterforcourse/U6A1_ConsoleRegisterForCourse.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package u6a1_consoleregisterforcourse ;

import java . util . Scanner ;

/**
*
* @author omora
*/
public class U6A1_ConsoleRegisterForCourse {

/**
* @param args the command line arguments
*/
public static void main ( String [] args ) {
// TODO code application logic here

System . out . println ( “Teacher’s Copy” );

Scanner input = new Scanner ( System . in );

//choice is the current menu selection
//firstChoice is the first menu selection mande by the user
//secondChoice is the second menu selection mande by the user
//thirdChoice is the third menu selection mande by the user
// a choice of 0 means the choice has not been made yet
int choice ;
int firstChoice = 0 , secondChoice = 0 , thirdChoice = 0 ;
int totalCredit = 0 ;
String yesOrNo = “” ;

do {

choice = getChoice ( input );

switch ( ValidateChoice ( choice , firstChoice , secondChoice , thirdChoice , totalCredit )) {
case – 1 :
System . out . println ( “**Invalid** – Your selection of ” + choice + ” is not a recognized course.” );
break ;
case – 2 :
System . out . println ( “**Invalid** – You have already registerd for this ” + ChoiceToCourse ( choice ) + ” course.” );
break ;
case – 3 :
System . out . println ( “**Invalid** – You can not register for more than 9 credit hours.” );
break ;
case 0 :
System . out . println ( “Registration Confirmed for course ” + ChoiceToCourse ( choice ) );
totalCredit += 3 ;
if ( firstChoice == 0 )
firstChoice = choice ;
else if ( secondChoice == 0 )
secondChoice = choice ;
else if ( thirdChoice == 0 )
thirdChoice = choice ;
break ;
}

WriteCurrentRegistration ( firstChoice , secondChoice , thirdChoice );

System . out . print ( “\nDo you want to try again? (Y|N)? : ” );

yesOrNo = input . next (). toUpperCase ();

} while ( yesOrNo . equals ( “Y” ));

System . out . println ( “Thank you for registering with us” );

}

public static int getChoice ( Scanner input ) {
System . out . println ( “Please type the number inside the [] to register for a course” );
System . out . println ( “[1]IT4782\n[2]IT4784\n[3]IT4786\n[4]IT4789\n[5]IT2230\n[6]IT3345\n[7]IT3349” );
System . out . print ( “Enter your choice : ” );
return ( input . nextInt ());

}

//This method validates the user menu selection
//against the given registration business rules
//it returns the following code based on the validation result
// -1 = invalid, unrecognized menu selection
// -2 = invalid, alredy registered for the course
// -3 = invalid, No more than 9 credit hours allowed
// 0 = menu selection is valid
public static int ValidateChoice ( int choice , int firstChoice , int secondChoice , int thirdChoice , int totalCredit ) {

// TO DO – Add Code to:
// Validate user menu selection (the int choice method arguement)
// against the given registration business rules

return 0 ;
}

public static void WriteCurrentRegistration ( int firstChoice , int secondChoice , int thirdChoice ) {

if ( firstChoice == 0 )
System . out . println ( “Current course registration: { none } ” );
else if ( secondChoice == 0 )
System . out . println ( “Current course registration: { ” + ChoiceToCourse ( firstChoice ) + ” }” );
else if ( thirdChoice == 0 )
System . out . println ( “Current course registration: { ” + ChoiceToCourse ( firstChoice ) +
“, ” + ChoiceToCourse ( secondChoice ) + ” }” );
else
System . out . println ( “Current course registration: { ” + ChoiceToCourse ( firstChoice ) +
“, ” + ChoiceToCourse ( secondChoice ) + “, ” + ChoiceToCourse ( thirdChoice ) + ” }” );
}

public static String ChoiceToCourse ( int choice ) {
String course = “” ;
switch ( choice )
{
case 1 :
course = “IT4782” ;
break ;
case 2 :
course = “IT4784” ;
break ;
case 3 :
course = “IT4786” ;
break ;
case 4 :
course = “IT4789” ;
break ;
case 5 :
course = “IT2230” ;
break ;
case 6 :
course = “IT3345” ;
break ;
case 7 :
course = “IT3349” ;
break ;
default :
break ;
}
return course ;
}

}

Order from us and get better grades. We are the service you have been looking for.