I need some real help here, this is the assignment I am working on So what I
Question:
I need some real help here, this is the assignment I am working on
So what I am trying to do is create a menu that will allow the user to either create a new family history, or print out the NewMod2.family that has already been created, however I am lost on where to put my brackets properly and how best to complete this logic.
package fHist2;
import java.util.Scanner;
public class NewMod2 {
private String name = "Lawrence Magee";
private String name2;
private static String family = "1 wife, 1 daughter";
private static String family2;
{}
{
} //method instance created
private void famRecord(String name, String obj, String family) {
this.name = name;
NewMod2.family = family;
}
private boolean isInvalidStr(String name2) {
String str = null;
if (str.isBlank() || str.isEmpty() || str == null){
return true;
return false;
//main method created
public static int main(String[]args) {
public void famRecord2(String name2, String obj, String family2); {
this.name2 = name2;
NewMod2.family2 = family2;
{
Scanner scanner = new Scanner (System.in);
NewMod2 ob = new NewMod2();
Scanner input = new Scanner(System.in);
while(true)
System.out.println("To create new history: Press 1");
System.out.println("for family history of Lawrence: Press 2 ");
int Choice = (input.nextInt());{
switch (Choice) {
case 1:
System.out.println("Enter your name");
String str = (input.nextLine());
}
}
case 2:
System.out.println("this is your immidiate family history");
System.out.println(" Your name: " + ob.name);
System.out.println(" Family Members" + family);
Fundamentals of Cost Accounting
ISBN: 978-0077398194
3rd Edition
Authors: William Lanen, Shannon Anderson, Michael Maher